Fixed "PHP Notice: Only variables should be passed by reference"

This commit is contained in:
Pablo Castellano 2019-04-28 19:13:06 +02:00
parent 3d4598dbf3
commit c3a9f56b47

View File

@ -20,11 +20,12 @@ class UpdateCommand extends ConsoleKit\Command
$box = new ConsoleKit\Widgets\Box($this->getConsole(), 'Actualizando datapackage.json');
$box->write();$this->getConsole()->writeln("");
// Comprobobamos si hay que omitir JSON
// Comprobamos si hay que omitir JSON
if (!isset($options['nojson']) && !isset($options['n'])){
foreach ( Config::$datapackage['resources'] as $resource){
$resource['format'] = 'json';
$resource['path'] = array_shift(explode('.',$resource['path'])) . ".json";
$parts = explode('.',$resource['path']);
$resource['path'] = array_shift($parts) . ".json";
$datapackageNew['resources'][]=$resource;
}
}
@ -47,4 +48,4 @@ class UpdateCommand extends ConsoleKit\Command
}
}
}