01478: Deprecated: Passing null to ...

Summary: Deprecated: Passing null to ...
Created: 2022-08-10 08:57
Status: Open
Category: PHP Compatibility
Assigned:
Priority: 1
Version: 2.3.8
OS: 8.1.8

Description: Error Message upon starting 2.3.8: "PHP Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /data/html/pmwiki-2.3.8/pmwiki.php on line 318"

Cause: @$_SERVER['QUERY_STRING'] is unset

Fix: replace all "@$_SERVER['whatever']" with "strval(@$_SERVER['whatever'])"

Of course you only see this error when running pmwiki against php's built-in webserver (or use a "development" php.ini)

Best, Ben Benedikt Hochstrasser

Thanks, updated for 2.3.9. Please report if you find any other warnings from the built-in PHP web-server. --Petko