Last modified: 2014-05-21 20:44:08 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T67432, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 65432 - PHP notice: Undefined Offset: 1
PHP notice: Undefined Offset: 1
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
DataValues (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-17 12:02 UTC by Christopher Johnson
Modified: 2014-05-21 20:44 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Christopher Johnson 2014-05-17 12:02:46 UTC
vendor/data-values/data-types/js/resources.php on line 19
vendor/data-values/javascript/lib/resources.php on line 16
vendor/data-values/javascript/src/resources.php on line 16
vendor/data-values/javascript/src/valueFormatters/resources.php on line 15
vendor/data-values/javascript/src/valueParsers/resources.php on line 16

This is the result of duplicate code in these 5 files that explodes a path assuming a delimiter that contains "extensions".  Since composer, the install path is no longer in the extensions directory, but in $vendorDir.

Problem code:
return call_user_func( function() {
	$remoteExtPathParts = explode(
		DIRECTORY_SEPARATOR . 'extensions' . DIRECTORY_SEPARATOR, __DIR__, 2
	);

	$moduleTemplate = array(
		'localBasePath' => __DIR__,
		'remoteExtPath' => $remoteExtPathParts[1],
	);
Comment 1 Christopher Johnson 2014-05-17 12:16:16 UTC
Note that this occurs only if Wikibase is installed with composer from the root dir composer.json.  Then, Datavalues is installed in MW_INSTALL_PATH/vendor/... rather than MW_INSTALL_PATH/extensions/Wikibase/vendor/...

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links