We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The json_decode provided by the upgradephp script doesn't return an associative array for assoc = TRUE and breaks the bulk import.
Two edge cases:
A fix should be backported to the 1.X branch.
Steps to reproduce the error:
Manually add a "return TRUE;" in the first line of Common::useJsonLibrary().
Use the Python log importer.
Error is: Cannot use object of type as array in /var/www/domain.org/core/Common.php on line 594
The text was updated successfully, but these errors were encountered:
Okay - found an easier way to reproduce the problem. It's the specific bulk-tracking format:
data.json:
{"requests":[{"test":"1"},{"best":"2"}], "token_auth": "anonymous"}
test.php:
<?php require_once 'libs/upgradephp/upgrade.php'; $json = file_get_contents("data.json"); $result = _json_decode($json, TRUE); var_dump($result);
result
$ php test.php array(2) { 'requests' => array(2) { [0] => class stdClass#1 (1) { public $test => string(1) "1" } [1] => class stdClass#2 (1) { public $best => string(1) "2" } } 'token_auth' => string(9) "anonymous" }
expected
array(2) { 'requests' => array(2) { [0] => array(1) { 'test' => string(1) "1" } [1] => array(1) { 'best' => string(1) "2" } } 'token_auth' => string(9) "anonymous" }
Sorry, something went wrong.
In 40f0a20: Fixes upgradephp json_decode behaviour.
fixes #4191
halfdan
No branches or pull requests
The json_decode provided by the upgradephp script doesn't return an associative array for assoc = TRUE and breaks the bulk import.
Two edge cases:
A fix should be backported to the 1.X branch.
Steps to reproduce the error:
Manually add a "return TRUE;" in the first line of Common::useJsonLibrary().
Use the Python log importer.
Error is:
Cannot use object of type as array in /var/www/domain.org/core/Common.php on line 594
The text was updated successfully, but these errors were encountered: