Commit 17d2a336 authored by Eloy Lafuente's avatar Eloy Lafuente
Browse files

MDL-43896 admin: Avoid empty(expression), not working under PHP 5.4

parent 10006e8f
......@@ -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;
}
......
......@@ -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');
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment