Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
François Jacquet
rosariosis
Commits
85e554b2
Commit
85e554b2
authored
Oct 20, 2014
by
François Jacquet
Browse files
Bugifx Invalid argument supplied for foreach()
parent
6dc08998
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
modules/Food_Service/Users/Accounts.php
modules/Food_Service/Users/Accounts.php
+8
-5
No files found.
modules/Food_Service/Users/Accounts.php
View file @
85e554b2
...
...
@@ -68,11 +68,14 @@ if($_REQUEST['modfunc']=='create')
{
$fields
=
'STAFF_ID,BALANCE,TRANSACTION_ID,'
;
$values
=
"'"
.
UserStaffID
()
.
"','0.00','0',"
;
foreach
(
$_REQUEST
[
'food_service'
]
as
$column_name
=>
$value
)
{
$fields
.
=
$column_name
.
','
;
$values
.
=
"'"
.
trim
(
$value
)
.
"',"
;
}
if
(
is_array
(
$_REQUEST
[
'food_service'
]))
foreach
(
$_REQUEST
[
'food_service'
]
as
$column_name
=>
$value
)
{
$fields
.
=
$column_name
.
','
;
$values
.
=
"'"
.
trim
(
$value
)
.
"',"
;
}
$sql
=
'INSERT INTO FOOD_SERVICE_STAFF_ACCOUNTS ('
.
mb_substr
(
$fields
,
0
,
-
1
)
.
') values ('
.
mb_substr
(
$values
,
0
,
-
1
)
.
')'
;
DBQuery
(
$sql
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment