Open jsstaedtler opened 2 years ago
I have the same problem. This is what is written in the site console:
<br />
<b>Fatal error</b>: Uncaught TypeError: unserialize(): Argument #1 ($data) must be of type string, array given in /config/www/plugins/adult_content/maintain.inc.php:139
Stack trace:
#0 /config/www/plugins/adult_content/maintain.inc.php(139): unserialize()
#1 /app/www/public/admin/include/plugins.class.php(26): plugin_activate()
#2 /app/www/public/admin/include/plugins.class.php(181): DummyPlugin_maintain->activate()
#3 /app/www/public/include/ws_functions/pwg.extensions.php(71): plugins->perform_action()
#4 /app/www/public/include/ws_core.inc.php(600): ws_plugins_performAction()
#5 /app/www/public/include/ws_protocols/rest_handler.php(41): PwgServer->invoke()
#6 /app/www/public/include/ws_core.inc.php(281): PwgRestRequestHandler->handleRequest()
#7 /app/www/public/ws.php(22): PwgServer->run()
#8 {main}
thrown in <b>/config/www/plugins/adult_content/maintain.inc.php</b> on line <b>139</b><br />
The fix I found was to edit file maintain.inc.php. Near the bottom of plugin_activate(), line 139 causes the error (and isn't needed after using pwg_db_fetch_array()):
$cf=unserialize($data_conf);
Replace that line with the following:
$cf=$data_conf;
I'm running Piwigo 13.2.0. I can download the adult_content 2.4.6 plugin, but when I try to activate it, instead of a green "Activated" pop-up, a red "an error occurred" message.
When I check my PHP log, this is the error (for reference, it's PHP 8.0.25):