Bug 7936 - AbntCitationPlugin.inc.php uses undefined constant String
AbntCitationPlugin.inc.php uses undefined constant String
Status: RESOLVED FIXED
Product: OJS
Classification: Unclassified
Component: Open Journal Systems
2.4.1
All All
: P3 normal
Assigned To: PKP Support
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-25 11:24 PDT by Ales Kladnik
Modified: 2012-09-25 11:35 PDT (History)
1 user (show)

See Also:
Version Reported In:
Also Affects:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ales Kladnik 2012-09-25 11:24:14 PDT
I'm seeing numerous errors in our server log like this:

NOTICE: Use of undefined constant String - assumed 'String' (/var/www/html/ojs/plugins/citationFormats/abnt/AbntCitationPlugin.inc.php:98)

I've located the problematic function:

	function displayCitation(&$article, &$issue, &$journal) {
		$templateMgr =& TemplateManager::getManager();
		$templateMgr->register_modifier('mb_upper', array(String, 'strtoupper'));
		return parent::displayCitation($article, $issue, $journal);
	}

The register_modifier('mb_upper', array(String, 'strtoupper')); function apparently uses undefined constant String. Could it be that it should be just put in quotes? I just did that, and it seems that the errors have stopped, but I don't know if the function now works as it should...

I'm using OJS 2.4.0.
Comment 1 Alec Smecher 2012-09-25 11:30:02 PDT
Fixed missing quotes
https://github.com/pkp/ojs/commit/9e0b5b633941d27139b70626605e3c4262818dee
Comment 2 Alec Smecher 2012-09-25 11:32:43 PDT
Thanks, Ales; that is the correct solution.
Comment 3 Alec Smecher 2012-09-25 11:33:00 PDT
Patch for OJS 2.4.0 is <https://github.com/pkp/ojs/commit/9e0b5b633941d27139b70626605e3c4262818dee.diff>.
Comment 4 Alec Smecher 2012-09-25 11:35:02 PDT
Fixed missing quotes
https://github.com/pkp/ojs/commit/adc91cce36dddedb7c2c6ccdf3fc03d61ccfc0bf