Page MenuHomePhabricator

PHP Warning: strpos(): Empty needle in /includes/OutputPage.php on line 3871
Closed, ResolvedPublic

Description

Getting this warning 3 times, each time page loads. That because $wgScriptPath = ""; but this setting is recommended by Manual:Short_URL and http://shorturls.redwerks.org/

 public static function transformResourcePath( Config $config, $path ) {
   global $IP;
   $remotePath = $config->get( 'ResourceBasePath' );
   if ( strpos( $path, $remotePath ) !== 0 ) {
     // Path is outside wgResourceBasePath, ignore.
     return $path;
   }
   $path = RelPath\getRelativePath( $path, $remotePath );
   return self::transformFilePath( $remotePath, $IP, $path );
}

Link to exact string https://phabricator.wikimedia.org/diffusion/MW/browse/master/includes/OutputPage.php;41a15e0df33c404fd738c2dd39bb921d0a033a95$3874

$wgResourceBasePath is equal to $wgScriptPath

The only usage of transformResourcePath https://phabricator.wikimedia.org/diffusion/MW/browse/master/includes/resourceloader/ResourceLoaderSkinModule.php;41a15e0df33c404fd738c2dd39bb921d0a033a95$37

Event Timeline

Change 272432 had a related patch set uploaded (by Umherirrender):
Fix resource path check when ResourceBasePath is an empty string

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

Change 272432 had a related patch set uploaded (by Tim Starling):
Fix resource path check when ResourceBasePath is an empty string

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

Change 272432 merged by jenkins-bot:
Fix resource path check when ResourceBasePath is an empty string

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

Change 272918 had a related patch set uploaded (by Paladox):
Fix resource path check when ResourceBasePath is an empty string

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

Change 272919 had a related patch set uploaded (by Paladox):
Fix resource path check when ResourceBasePath is an empty string

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

Change 272918 abandoned by Krinkle:
Fix resource path check when ResourceBasePath is an empty string

Reason:
Not relevant for wmf. There is no problem to fix here.

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

Change 272919 abandoned by Krinkle:
Fix resource path check when ResourceBasePath is an empty string

Reason:
Not relevant for wmf. There is no problem to fix here.

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

Change 272978 had a related patch set uploaded (by Krinkle):
Fix resource path check when ResourceBasePath is an empty string

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

Change 272979 had a related patch set uploaded (by Krinkle):
Fix resource path check when ResourceBasePath is an empty string

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

Change 272978 merged by jenkins-bot:
Fix resource path check when ResourceBasePath is an empty string

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

Change 272979 merged by jenkins-bot:
Fix resource path check when ResourceBasePath is an empty string

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