splitbrain / dokuwiki-plugin-gallery

Creates a gallery of images from a namespace or RSS/ATOM feed in DokuWiki
http://www.dokuwiki.org/plugin:gallery
GNU General Public License v2.0
21 stars 25 forks source link

Warning: Array to string conversion in [path]/metadata.php on line 618 #198

Open barryparr opened 7 months ago

barryparr commented 7 months ago

The first time in each session when I load a page with a gallery, I get this error, once for each image in the gallery.

Warning: Array to string conversion in [path]/metadata.php on line 618

I also these errors at the end of the long list of individual image errors:

Warning: Cannot modify header information - headers already sent by (output started at [path]/metadata.php:618) in [path]/actions.php on line 42

Warning: Cannot modify header information - headers already sent by (output started at [path]/metadata.php:618) in [path]/tpl/typowiki/main.php on line 11

barryparr commented 6 months ago

Once the all the images are downloaded, the error message goes away on subsequent visits.

madchrist commented 1 month ago

I have the same error

https://github.com/splitbrain/dokuwiki-plugin-gallery/blob/934fd4d1b4b464d722648b41fe8ca0e140d58298/classes/BasicFormatter.php#L56-L70

The plugin passes an array as second argument to $this->renderer->internalmedia() but that function expects multiple strings and numbers instead

As far as i can tell this error only affect the "abstract", whatever that is, but not the render of the page

A workaround is to simply remove ", $imgdata" from line 68 (and maybe also from 66)