aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaladox <thomasmulhall410@yahoo.com>2024-11-02 16:21:14 +0000
committerReedy <reedy@wikimedia.org>2025-03-31 19:20:25 +0000
commit625bdfe7e135d3c4c817c6a9c49e79015b4a7fd7 (patch)
treef48582563ccaa5b0e4b9ca4faaa5c2968ff41f40
parent0d70488f4ca6a39f04bae89d4df57c4e1f44e1f8 (diff)
downloadmediawikicore-625bdfe7e135d3c4c817c6a9c49e79015b4a7fd7.tar.gz
mediawikicore-625bdfe7e135d3c4c817c6a9c49e79015b4a7fd7.zip
FileBackend: PHP Deprecated: strrpos(): Passing null to parameter #1 ($haystack)
``` PHP Deprecated: strrpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /srv/mediawiki/1.42/includes/libs/filebackend/FileBackend.php on line 1588 ``` Bug: T384851 Change-Id: I36c401587d94e7c1ab444d355b03ea88da8fb6e8 (cherry picked from commit 1a4d7d410c527f6a9f57b5c3e6f733a4a64f41c1)
-rw-r--r--includes/libs/filebackend/FileBackend.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/libs/filebackend/FileBackend.php b/includes/libs/filebackend/FileBackend.php
index be8dd15f4787..89c5b0c44ffb 100644
--- a/includes/libs/filebackend/FileBackend.php
+++ b/includes/libs/filebackend/FileBackend.php
@@ -1630,7 +1630,7 @@ abstract class FileBackend implements LoggerAwareInterface {
final public static function extensionFromPath( $path, $case = 'lowercase' ) {
// This will treat a string starting with . as not having an extension, but store paths have
// to start with 'mwstore://', so "garbage in, garbage out".
- $i = strrpos( $path, '.' );
+ $i = strrpos( $path ?? '', '.' );
$ext = $i ? substr( $path, $i + 1 ) : '';
if ( $case === 'lowercase' ) {