dokufreaks / plugin-meta

http://dokuwiki.org/plugin:meta
8 stars 7 forks source link

Error argument 1 is not an array #2

Closed TomCafferty closed 9 years ago

TomCafferty commented 12 years ago

An error of "argument 1 is not an array" is displayed when trying to set the description abstract meta data and the meta data is not set.

The problem is explained at http://php.net/manual/en/function.array-merge.php - "The behavior of array_merge() was modified in PHP 5. Unlike PHP 4, array_merge() now only accepts parameters of type array. However, you can use typecasting to merge other types.".

The solution is to change line 91 in syntax.php from array_merge($renderer->meta[$key], $value); To array_merge((array)$renderer->meta[$key], $value);