Page MenuHomePhabricator

substr(): Passing null to parameter #1 ($string) of type string is deprecated
Closed, ResolvedPublic

Description

Related to T289926: Fix passing null to non-null param of PHP internal functions in MediaWiki core (PHP 8.1 warning)

Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/wiki/mediawiki/core/maintenance/update.php on line 96

Call Stack:
    0.0007     438296   1. {main}() /var/www/wiki/mediawiki/core/maintenance/update.php:0
    0.0048     689248   2. require_once('/var/www/wiki/mediawiki/core/maintenance/doMaintenance.php') /var/www/wiki/mediawiki/core/maintenance/update.php:264
    0.5686   27682776   3. UpdateMediaWiki->execute() /var/www/wiki/mediawiki/core/maintenance/doMaintenance.php:108
    0.5686   27682872   4. substr($string = NULL, $offset = 0, $length = 2) /var/www/wiki/mediawiki/core/maintenance/update.php:96

Event Timeline

Reedy updated the task description. (Show Details)

Change 755928 had a related patch set uploaded (by Ammarpad; author: Ammarpad):

[mediawiki/core@master] update.php: Avoid passing null to substr

https://gerrit.wikimedia.org/r/755928

Change 755928 merged by jenkins-bot:

[mediawiki/core@master] update.php: Avoid passing null to substr

https://gerrit.wikimedia.org/r/755928

Change 756071 had a related patch set uploaded (by Reedy; author: Ammarpad):

[mediawiki/core@REL1_37] update.php: Avoid passing null to substr

https://gerrit.wikimedia.org/r/756071

Change 756072 had a related patch set uploaded (by Reedy; author: Ammarpad):

[mediawiki/core@REL1_36] update.php: Avoid passing null to substr

https://gerrit.wikimedia.org/r/756072

Change 756073 had a related patch set uploaded (by Reedy; author: Ammarpad):

[mediawiki/core@REL1_35] update.php: Avoid passing null to substr

https://gerrit.wikimedia.org/r/756073

Change 756073 merged by jenkins-bot:

[mediawiki/core@REL1_35] update.php: Avoid passing null to substr

https://gerrit.wikimedia.org/r/756073

Change 756072 merged by jenkins-bot:

[mediawiki/core@REL1_36] update.php: Avoid passing null to substr

https://gerrit.wikimedia.org/r/756072

Change 756071 merged by jenkins-bot:

[mediawiki/core@REL1_37] update.php: Avoid passing null to substr

https://gerrit.wikimedia.org/r/756071

tstarling assigned this task to Ammarpad.
tstarling subscribed.

I think this task only refers to the specific case of update.php, so this is resolved. T289926 is for the audit.