Hello/Hi/Greetings,
I upgraded my Ubuntu 20.4 to PHP8.1 and now I get these errors many many times on the page
Deprecated: strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated in /home/www/html/piwigo/include/functions_html.inc.php on line 534
Deprecated: strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated in /home/www/html/piwigo/include/functions_html.inc.php on line 534
Environment details,
Piwigo 12.2.0 Check for upgrade
Operating system: Linux
PHP: 8.1.7 (Show info) [2022-07-08 03:06:18]
MySQL: 8.0.29-0ubuntu0.20.04.3 [2022-07-08 03:06:18]
Graphics Library: ImageMagick 6.9.10-23
Cache size 1334.08 MB calculated right now Refresh
Piwigo URL: http://dingo-den.com/piwigo/?nav=piwigo
Offline
I had a look at the code in and this is what is on line 534
532 function render_category_literal_description($desc) 533 { 534 return strip_tags($desc, '<span><p><a><br><b><i><small><big><strong><em>') ; 535 }
Offline
Deprecated means just deprecated, it's not an error, functionality will cease to exist in later PHP versions. You can suppress such messages like in [Forum, post 183126 by erAck in topic 31852] Menubar tags issue after 12.2.0 upgrade or rather log them like in [Forum, post 180778 by erAck in topic 31258] Error Message.
Apart from that, Piwigo is simply not ready for PHP 8.1, it barely works with PHP 8.0 but still has quirks with it, the only safe version to use is PHP 7.4.
Offline
OK Thanks for the help, I added the foolowing to my config file at /piwigo/include/config_default.inc.php
$conf['show_php_errors'] = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_WARNING;
The messages on the screen have stopped.
Offline
I had my own bitter lot with PHP. Once I updated it to the latest version and it crashed my site as the CMS did not support it. So later when I needed some apps for my business I handled it to [-link-removed-] to avoid any further complicaitons. Another advantage will be the cost effectiveness, but that you can check by yourself already.
Offline
I had no idea how to deal with this error myself, but I'm glad I found this page
Offline