Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
ad824341
Commit
ad824341
authored
Jul 08, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bug in input class causing entire array to not be returned.
parent
54750487
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
7 deletions
+12
-7
input.php
system/input.php
+3
-3
router.php
system/router.php
+7
-2
session.php
system/session.php
+2
-2
No files found.
system/input.php
View file @
ad824341
...
...
@@ -34,7 +34,7 @@ class Input {
static
::
hydrate
();
}
return
(
array_key_exists
(
$key
,
static
::
$input
))
?
static
::
$input
[
$key
]
:
$default
;
return
Arr
::
get
(
static
::
$input
,
$key
,
$default
)
;
}
/**
...
...
@@ -62,7 +62,7 @@ class Input {
throw
new
\Exception
(
"Sessions must be enabled to retrieve old input data."
);
}
return
(
array_key_exists
(
$key
,
$old
=
Session
::
get
(
'laravel_old_input'
,
array
())))
?
$old
[
$key
]
:
$default
;
return
Arr
::
get
(
Session
::
get
(
'laravel_old_input'
,
array
()),
$key
,
$default
)
;
}
/**
...
...
@@ -81,7 +81,7 @@ class Input {
return
(
isset
(
$_FILES
[
$file
][
$key
]))
?
$_FILES
[
$file
][
$key
]
:
$default
;
}
return
(
array_key_exists
(
$key
,
$_FILES
))
?
$_FILES
[
$key
]
:
$default
;
return
Arr
::
get
(
$_FILES
,
$key
,
$default
)
;
}
/**
...
...
system/router.php
View file @
ad824341
...
...
@@ -20,7 +20,7 @@ class Router {
{
if
(
is_null
(
static
::
$routes
))
{
static
::
$routes
=
(
is_dir
(
APP_PATH
.
'routes'
))
?
static
::
load
(
$uri
)
:
require
APP_PATH
.
'routes'
.
EXT
;
static
::
$routes
=
static
::
load
(
$uri
)
;
}
// Put the request method and URI in route form. Routes begin with the request method and a forward slash.
...
...
@@ -58,6 +58,11 @@ class Router {
*/
public
static
function
load
(
$uri
)
{
if
(
!
is_dir
(
APP_PATH
.
'routes'
))
{
return
require
APP_PATH
.
'routes'
.
EXT
;
}
if
(
!
file_exists
(
APP_PATH
.
'routes/home'
.
EXT
))
{
throw
new
\Exception
(
"A [home] route file is required when using a route directory."
);
...
...
@@ -89,7 +94,7 @@ class Router {
* @param string $route
* @return array
*/
p
rivate
static
function
parameters
(
$uri
,
$route
)
p
ublic
static
function
parameters
(
$uri
,
$route
)
{
return
array_values
(
array_intersect_key
(
explode
(
'/'
,
$uri
),
preg_grep
(
'/\(.+\)/'
,
explode
(
'/'
,
$route
))));
}
...
...
system/session.php
View file @
ad824341
...
...
@@ -7,14 +7,14 @@ class Session {
*
* @var Session\Driver
*/
p
rivate
static
$driver
;
p
ublic
static
$driver
;
/**
* The session.
*
* @var array
*/
p
rivate
static
$session
=
array
();
p
ublic
static
$session
=
array
();
/**
* Get the session driver.
...
...
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