Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't try to json_decode() a null value #20675

Merged
merged 2 commits into from
Jun 6, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add Registry package fix to make sure broken code can continue to work
  • Loading branch information
Michael Babker committed Jun 6, 2018
commit b121185205da96c17f36a97d3db24b36a41e5d85
10 changes: 5 additions & 5 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions libraries/vendor/composer/autoload_classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,6 @@
'Joomla\\Session\\Storage\\None' => $vendorDir . '/joomla/session/Joomla/Session/Storage/None.php',
'Joomla\\Session\\Storage\\Wincache' => $vendorDir . '/joomla/session/Joomla/Session/Storage/Wincache.php',
'Joomla\\Session\\Storage\\Xcache' => $vendorDir . '/joomla/session/Joomla/Session/Storage/Xcache.php',
'Joomla\\Session\\Tests\\Handler\\ApcuHandlerTest' => $vendorDir . '/joomla/session/tests/Handler/ApcuHandlerTest.php',
'Joomla\\Session\\Tests\\Handler\\DatabaseHandlerTest' => $vendorDir . '/joomla/session/tests/Handler/DatabaseHandlerTest.php',
'Joomla\\Session\\Tests\\Handler\\FilesystemHandlerTest' => $vendorDir . '/joomla/session/tests/Handler/FilesystemHandlerTest.php',
'Joomla\\Session\\Tests\\Handler\\MemcachedHandlerTest' => $vendorDir . '/joomla/session/tests/Handler/MemcachedHandlerTest.php',
'Joomla\\Session\\Tests\\Handler\\NativeStorageTest' => $vendorDir . '/joomla/session/tests/Storage/NativeStorageTest.php',
'Joomla\\Session\\Tests\\Handler\\RedisHandlerTest' => $vendorDir . '/joomla/session/tests/Handler/RedisHandlerTest.php',
'Joomla\\Session\\Tests\\Handler\\WincacheHandlerTest' => $vendorDir . '/joomla/session/tests/Handler/WincacheHandlerTest.php',
'Joomla\\Session\\Tests\\SessionTest' => $vendorDir . '/joomla/session/tests/SessionTest.php',
'Joomla\\String\\Inflector' => $vendorDir . '/joomla/string/src/Inflector.php',
'Joomla\\String\\Normalise' => $vendorDir . '/joomla/string/src/Normalise.php',
'Joomla\\String\\String' => $vendorDir . '/joomla/string/src/String.php',
Expand Down
8 changes: 0 additions & 8 deletions libraries/vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,14 +280,6 @@ class ComposerStaticInit205c915b9c7d3e718e7c95793ee67ffe
'Joomla\\Session\\Storage\\None' => __DIR__ . '/..' . '/joomla/session/Joomla/Session/Storage/None.php',
'Joomla\\Session\\Storage\\Wincache' => __DIR__ . '/..' . '/joomla/session/Joomla/Session/Storage/Wincache.php',
'Joomla\\Session\\Storage\\Xcache' => __DIR__ . '/..' . '/joomla/session/Joomla/Session/Storage/Xcache.php',
'Joomla\\Session\\Tests\\Handler\\ApcuHandlerTest' => __DIR__ . '/..' . '/joomla/session/tests/Handler/ApcuHandlerTest.php',
'Joomla\\Session\\Tests\\Handler\\DatabaseHandlerTest' => __DIR__ . '/..' . '/joomla/session/tests/Handler/DatabaseHandlerTest.php',
'Joomla\\Session\\Tests\\Handler\\FilesystemHandlerTest' => __DIR__ . '/..' . '/joomla/session/tests/Handler/FilesystemHandlerTest.php',
'Joomla\\Session\\Tests\\Handler\\MemcachedHandlerTest' => __DIR__ . '/..' . '/joomla/session/tests/Handler/MemcachedHandlerTest.php',
'Joomla\\Session\\Tests\\Handler\\NativeStorageTest' => __DIR__ . '/..' . '/joomla/session/tests/Storage/NativeStorageTest.php',
'Joomla\\Session\\Tests\\Handler\\RedisHandlerTest' => __DIR__ . '/..' . '/joomla/session/tests/Handler/RedisHandlerTest.php',
'Joomla\\Session\\Tests\\Handler\\WincacheHandlerTest' => __DIR__ . '/..' . '/joomla/session/tests/Handler/WincacheHandlerTest.php',
'Joomla\\Session\\Tests\\SessionTest' => __DIR__ . '/..' . '/joomla/session/tests/SessionTest.php',
'Joomla\\String\\Inflector' => __DIR__ . '/..' . '/joomla/string/src/Inflector.php',
'Joomla\\String\\Normalise' => __DIR__ . '/..' . '/joomla/string/src/Normalise.php',
'Joomla\\String\\String' => __DIR__ . '/..' . '/joomla/string/src/String.php',
Expand Down
12 changes: 6 additions & 6 deletions libraries/vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -604,17 +604,17 @@
},
{
"name": "joomla/registry",
"version": "1.6.1",
"version_normalized": "1.6.1.0",
"version": "1.6.2",
"version_normalized": "1.6.2.0",
"source": {
"type": "git",
"url": "https://github.com/joomla-framework/registry.git",
"reference": "9b7fe128204301bebdae9bd8f02868e8e2e36f74"
"reference": "182eed3a56b2b7e14cef11fdbc63c253ddcfd924"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/joomla-framework/registry/zipball/9b7fe128204301bebdae9bd8f02868e8e2e36f74",
"reference": "9b7fe128204301bebdae9bd8f02868e8e2e36f74",
"url": "https://api.github.com/repos/joomla-framework/registry/zipball/182eed3a56b2b7e14cef11fdbc63c253ddcfd924",
"reference": "182eed3a56b2b7e14cef11fdbc63c253ddcfd924",
"shasum": ""
},
"require": {
Expand All @@ -632,7 +632,7 @@
"suggest": {
"symfony/yaml": "Install symfony/yaml if you require YAML support."
},
"time": "2018-05-26T16:34:53+00:00",
"time": "2018-06-06T16:48:30+00:00",
"type": "joomla-package",
"extra": {
"branch-alias": {
Expand Down
6 changes: 6 additions & 0 deletions libraries/vendor/joomla/registry/src/Format/Json.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ public function stringToObject($data, array $options = array('processSections' =
{
$data = trim($data);

// Because developers are clearly not validating their data before pushing it into a Registry, we'll do it for them
if (empty($data))
{
return new \stdClass;
}

if ($data !== '' && $data[0] !== '{')
{
return AbstractRegistryFormat::getInstance('Ini')->stringToObject($data, $options);
Expand Down