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
f53ebbf6
Commit
f53ebbf6
authored
Jan 17, 2012
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix glob error in bundle class.
parent
d50638cc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
12 deletions
+16
-12
bundle.php
laravel/bundle.php
+10
-6
command.php
laravel/cli/command.php
+6
-6
No files found.
laravel/bundle.php
View file @
f53ebbf6
...
...
@@ -271,10 +271,6 @@ class Bundle {
/**
* Detect all of the existing bundles in the application.
*
* The names of the bundles are cached so this operation will be only be
* performed once and then the same array will be returned on each later
* request for the bundle names.
*
* @return array
*/
public
static
function
all
()
...
...
@@ -283,9 +279,17 @@ class Bundle {
$bundles
=
array
();
foreach
(
array_filter
(
glob
(
BUNDLE_PATH
.
'*'
),
'is_dir'
)
as
$bundle
)
$files
=
glob
(
BUNDLE_PATH
.
'*'
);
// When open_basedir is enabled the glob function returns false on
// an empty array. We'll check for this and return an empty array
// if the bundle directory doesn't have any bundles.
if
(
$files
!==
false
)
{
$bundles
[]
=
basename
(
$bundle
);
foreach
(
array_filter
(
$files
,
'is_dir'
)
as
$bundle
)
{
$bundles
[]
=
basename
(
$bundle
);
}
}
return
static
::
$bundles
=
$bundles
;
...
...
laravel/cli/command.php
View file @
f53ebbf6
...
...
@@ -71,17 +71,17 @@ class Command {
{
$identifier
=
Bundle
::
identifier
(
$bundle
,
$task
);
// First we'll check to see if the task has been registered in
//
the application IoC container. This allows dependencies to
//
be
injected into tasks for more testability.
// First we'll check to see if the task has been registered in
the
//
application IoC container. This allows all dependencies to be
// injected into tasks for more testability.
if
(
IoC
::
registered
(
"task:
{
$identifier
}
"
))
{
return
IoC
::
resolve
(
"task:
{
$identifier
}
"
);
}
// If the task file exists, we'll format the bundle and task
//
name into a task class name and resolve an instance of
// the
so that the
requested method may be executed.
// If the task file exists, we'll format the bundle and task
name
//
into a task class name and resolve an instance of the so that
// the requested method may be executed.
if
(
file_exists
(
$path
=
Bundle
::
path
(
$bundle
)
.
'tasks/'
.
$task
.
EXT
))
{
require
$path
;
...
...
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