Possible fix for #5470 - json_decode() (#5511)

* Possible fix for #5470:
- $data is not an object like stdClass but an array
- newer PHP versions doesn't allow cross-access like following:

  $object['foo'] = 123;
  $array->foo = 123;

- added type-hints for private methods for above cases
- used `if (empty($foo)) instead of just `if ($foo)` preventing some nasty
  E_NOTICE
- added some empty lines for better readability

* Rewrite:
- mixture of object/array was here, causing under newer PHP versions some E_NOTICE
- this has been now finally fixed by converting any `object` type to an
  associative `array`
- also changed `is_object()` to `is_array()`
This commit is contained in:
Roland Häder 2018-07-28 07:35:27 +02:00 committed by Hypolite Petovan
parent 4a22710b3b
commit c30ac30f29

File diff suppressed because it is too large Load diff