Custom distiller goes wrong with object
Issue #28
resolved
PHP Warning: array_keys() expects parameter 1 to be array, object given in /typo3conf/ext/nnrestapi/Classes/Distiller/AbstractDistiller.php line 49
Investigating AbstractDistiller->isAssoc($arr), I found the array to be an object which makes distilling break. Workaround: add the following lines at top of AbstractDistiller->processData():
if (is_object($data)) {$data = \nn\T3::Convert()->toArray($data); }
\nn\t3::debug(['$keysToKeep'=>$this->keysToKeep,'$data'=>$data]);
Comments (4)
-
-
- changed status to resolved
Fix Issue
#28Custom distiller goes wrong with object→ <<cset 407f97f2100c>>
-
sure.
-
Fix Issue
#28Custom distiller goes wrong with object→ <<cset 407f97f2100c>>
- Log in to comment
Thanks for reporting!
As an alternative: Would this also work in your case?