Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
UserAdminV2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
庄欣
UserAdminV2
Commits
ec2fc6dd
Commit
ec2fc6dd
authored
Jan 24, 2012
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed infinite loop when removing magic.
parent
bf509b67
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
laravel/helpers.php
+6
-6
laravel/laravel.php
+5
-2
No files found.
laravel/helpers.php
View file @
ec2fc6dd
...
...
@@ -97,7 +97,7 @@ function array_set(&$array, $key, $value)
// If the key doesn't exist at this depth, we will just create an
// empty array to hold the next value, allowing us to create the
// arrays
necessary
to hold the final value at the proper depth.
// arrays to hold the final value at the proper depth.
if
(
!
isset
(
$array
[
$key
])
or
!
is_array
(
$array
[
$key
]))
{
$array
[
$key
]
=
array
();
...
...
@@ -197,10 +197,10 @@ function array_spin($array, $callback)
*/
function
array_strip_slashes
(
$array
)
{
$result
=
array
();
foreach
(
$array
as
$key
=>
$value
)
{
unset
(
$array
[
$key
]);
$key
=
stripslashes
(
$key
);
// If the value is an array, we will just recurse back into the
...
...
@@ -208,15 +208,15 @@ function array_strip_slashes($array)
// otherwise we will set the stripped value.
if
(
is_array
(
$value
))
{
$
array
[
$key
]
=
array_strip_slashes
(
$value
);
$
result
[
$key
]
=
array_strip_slashes
(
$value
);
}
else
{
$
array
[
$key
]
=
stripslashes
(
$value
);
$
result
[
$key
]
=
stripslashes
(
$value
);
}
}
return
$
array
;
return
$
result
;
}
/**
...
...
laravel/laravel.php
View file @
ec2fc6dd
...
...
@@ -67,9 +67,12 @@ ini_set('display_errors', 'Off');
*/
if
(
magic_quotes
())
{
$magic
=
array
(
&
$_GET
,
&
$_POST
,
&
$_COOKIE
,
&
$_REQUEST
);
$magic
s
=
array
(
&
$_GET
,
&
$_POST
,
&
$_COOKIE
,
&
$_REQUEST
);
array_walk
(
$magic
,
'array_strip_slashes'
);
foreach
(
$magics
as
&
$magic
)
{
$magic
=
array_strip_slashes
(
$magic
);
}
}
/**
...
...
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