utlib / IiifItems

Embed Mirador in Omeka Classic 2.3+ for building rich IIIF-compliant exhibits
Apache License 2.0
17 stars 10 forks source link

join(): Passing glue string after array is deprecated with PHP 7.4 #21

Closed DigExpCon closed 4 years ago

DigExpCon commented 4 years ago

The plugin does not seem to generate valid manifests after upgrading to PHP 7.4. The JSON contains the following error:

Deprecated: join(): Passing glue string after array is deprecated. Swap the parameters in [...]plugins/IiifItems/libraries/IiifItems/IiifUtil.php on line 82

Same error for IiifUtil.php on line 60, IiifUtil.php on line 64, and IiifUtil.php on line 72.

With parameters swapped (e.g., "$jsonData['label'] = join(' ', $elements['Dublin Core']['Title']);" instead of "$jsonData['label'] = join($elements['Dublin Core']['Title'], ' ');"), valid JSON is returned.

dicksonlaw583 commented 4 years ago

I have made a patch here: https://github.com/utlib/IiifItems/tree/dev-fix-glue-after-array

Please try it out on your installation and let me know how it goes in PR #22.

dicksonlaw583 commented 4 years ago

Resolved by merging PR #22.