omeka-s-themes / freedom

An Omeka S Theme
GNU General Public License v3.0
2 stars 3 forks source link

Fix notices on initial use of theme from strpos #1

Closed zerocrates closed 1 year ago

zerocrates commented 1 year ago

In PHP 8.1+, passing null to strpos generates a notice, and the theme uses it several times against the browse_layout setting. The settings are only null until the user goes and edits them.

This fixes the problem by setting a default value of "grid" to use for the setting instead of manually checking for null. This fix is more or less ported from Foundation which uses pretty much the same code and system.