Page MenuHomePhabricator

Don't use potentially undefined constants in namespace file
Closed, ResolvedPublic

Description

Otherwise we get warnings in GWToolset.namespaces.php during scap

Notice: Use of undefined constant NS_GWTOOLSET - assumed 'NS_GWTOOLSET' in /a/common/php-1.23wmf7/extensions/GWToolset/GWToolset.namespaces.php on line 12
PHP Notice: Use of undefined constant NS_GWTOOLSET_TALK - assumed 'NS_GWTOOLSET_TALK' in /a/common/php-1.23wmf7/extensions/GWToolset/GWToolset.namespaces.php on line 13

Explicitly use numbers, or add if !defined to the top of the file

if ( !defined( 'NS_GWTOOLSET' ) ) {
define( 'NS_GWTOOLSET', 490 );
define( 'NS_GWTOOLSET_TALK', NS_GWTOOLSET + 1 );
}


Version: master
Severity: minor

Details

Reference
bz58591

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:29 AM
bzimport set Reference to bz58591.
bzimport added a subscriber: Unknown Object (MLST).

Change 102423 had a related patch set uploaded by Dan-nl:
adding additional namespace test

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

Change 102423 merged by jenkins-bot:
adding namespaces as numeric values to GWToolset.namespaces.php and simplifying the defined test in GWToolset.php

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

sam,

the patch has been merged into the master branch and deployed to Commons.

please close this ticket if you’re satisfied with the results. if not, please
indicate what else needs to be addressed.

No feedback - Closing as per comment 3.