aboutsummaryrefslogtreecommitdiffstats
path: root/includes
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:37 +0000
commit5d065f0336a3776d176295bcee994c8f5f524add (patch)
tree0184e724ad24e33855d20c5b82ca5026b6d1db37 /includes
parent5dfb0817c30d85474bace68ebd8f099576be6e83 (diff)
downloadmediawikicore-5d065f0336a3776d176295bcee994c8f5f524add.tar.gz
mediawikicore-5d065f0336a3776d176295bcee994c8f5f524add.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)
Diffstat (limited to 'includes')
-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 a7644a249526..78ed371f8708 100644
--- a/includes/libs/filebackend/FileBackend.php
+++ b/includes/libs/filebackend/FileBackend.php
@@ -1585,7 +1585,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' ) {