backdrop-contrib / diff

Show differences between content revisions.
GNU General Public License v2.0
0 stars 5 forks source link

Deprecated function: The each() function is deprecated. #26

Open quicksketch opened 2 years ago

quicksketch commented 2 years ago

When viewing a diff in Standard mode, I get the following error message:

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in _DiffEngine->_diag() (line 315 of /var/www/html/web/modules/contrib/diff/DiffEngine.php). 

image

I'm running PHP 7.4, and it looks like this function was removed entirely in PHP 8.0 (meaning Diff probably doesn't work in PHP 8)

See https://www.php.net/manual/en/function.each.php

izmeez commented 9 months ago

@quicksketch That is correct. Testing Diff with php 8.1.x the Diff -> Standard view returns a fatal error with Error: Call to undefined function each() in _DiffEngine->_diag() (line 315 of /modules/diff/DiffEngine.php) and no display. Meanwhile with php 7.4.x it works with deprecated warning.

izmeez commented 5 months ago

Reminded of this on php 7.4 again while on page /admin/config/development/configuration Synchronize. Selected files copied from staging to active and page refreshed with Empty caches.

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in _DiffEngine->_diag() line 315 of /modules/diff/DiffEngine.php