Announcement

#1 2022-07-08 09:10:20

Dingo001
Member
2022-07-08
17

Error when updating from PHP 7 to PHP8

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

 

#2 2022-07-08 09:15:34

Dingo001
Member
2022-07-08
17

Re: Error when updating from PHP 7 to PHP8

I had a look at the code in and this is what is on line 534


Code:

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

 

#3 2022-07-08 10:30:50

erAck
Only trying to help
2015-09-06
2026

Re: Error when updating from PHP 7 to PHP8

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.


Running Piwigo at https://erack.net/gallery/

Offline

 

#4 2022-07-08 11:32:34

Dingo001
Member
2022-07-08
17

Re: Error when updating from PHP 7 to PHP8

OK Thanks for the help, I added the foolowing to my config file at  /piwigo/include/config_default.inc.php


Code:

$conf['show_php_errors'] = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_WARNING;

The messages on the screen have stopped.

Offline

 

#5 2023-01-24 15:34:23

ruthmarx
Member
2023-01-24
2

Re: Error when updating from PHP 7 to PHP8

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

 

#6 2023-03-08 13:02:10

krisine888
Member
2023-03-08
1

Re: Error when updating from PHP 7 to PHP8

I had no idea how to deal with this error myself, but I'm glad I found this page

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact