The each() function is deprecated


#1

Good Day:

If you visit https://ogs.on.ca/omeka - You will see the message at the top of the screen - This message will be suppressed on further calls in /home/ogsonca/public_html/omeka/application/libraries/Zend/Cache/Backend.php on line 79

Does anyone have a resolution to this issue. I was hoping to present this to my Board on Tuesday and i would like to clear this up. As well i am unable to roll back to PHP 7, i am currently on PHP 7.2 and the latest version of Omeka

Thanks

Steve Fulton UE


#2

You can try to disable deprecated warning in your php.ini file:

error_reporting = E_ALL & ~E_DEPRECATED

#3

Thanks i will keep this in mind. I would prefer a fix but will do this if needed.

Thanks

Steve Fulton UE


#4

Hi there - This issue has been resolved and would like to share the fix with anyone.

We solved our problem by changing the line in the file from

while (list($name, $value) = each($directives)) {

to

foreach ($directives as $name => $value){

Thanks

Steve Fulton UE


#5

This is fixed in the “master” or development branch of Omeka, so will be fixed in the next release.


#6

Thanks - When would that release be scheduled for?

Thanks

Steve Fulton UE