From b8f8c25260fcf65214ad7db2c0409c227b6edf58 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Sun, 29 Jul 2007 16:50:40 +0000 Subject: [PATCH] strpos() !== false is faster than strstr() --- includes/ImagePage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/ImagePage.php b/includes/ImagePage.php index d93436eed4..66e8ba68db 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -554,7 +554,7 @@ EOT $wgOut->showUnexpectedValueError( 'oldimage', htmlspecialchars($oldimage) ); return; } - if ( strstr( $oldimage, "/" ) || strstr( $oldimage, "\\" ) ) { + if( strpos( $oldimage, '/' ) !== false || strpos( $oldimage, '\\' ) !== false ) { $wgOut->showUnexpectedValueError( 'oldimage', htmlspecialchars($oldimage) ); return; } -- 2.20.1