Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
moodle
moodle
Commits
17d2a336
Commit
17d2a336
authored
Sep 02, 2015
by
Eloy Lafuente
Browse files
MDL-43896 admin: Avoid empty(expression), not working under PHP 5.4
parent
10006e8f
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/classes/plugin_manager.php
View file @
17d2a336
...
...
@@ -294,7 +294,7 @@ class core_plugin_manager {
include
(
$fullplug
.
'/version.php'
);
// Check if the legacy $module syntax is still used.
if
(
!
is_object
(
$module
)
or
(
!
empty
((
array
)
$module
)))
{
if
(
!
is_object
(
$module
)
or
(
count
((
array
)
$module
)
>
0
))
{
debugging
(
'Unsupported $module syntax detected in version.php of the '
.
$type
.
'_'
.
$plug
.
' plugin.'
);
$skipcache
=
true
;
}
...
...
lib/upgradelib.php
View file @
17d2a336
...
...
@@ -607,7 +607,7 @@ function upgrade_plugins_modules($startcallback, $endcallback, $verbose) {
require
(
$fullmod
.
'/version.php'
);
// Defines $plugin with version etc.
// Check if the legacy $module syntax is still used.
if
(
!
is_object
(
$module
)
or
(
!
empty
((
array
)
$module
)))
{
if
(
!
is_object
(
$module
)
or
(
count
((
array
)
$module
)
>
0
))
{
throw
new
plugin_defective_exception
(
$component
,
'Unsupported $module syntax detected in version.php'
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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