We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.

Bug 7936 - AbntCitationPlugin.inc.php uses undefined constant String
AbntCitationPlugin.inc.php uses undefined constant String
Product: OJS
Classification: Unclassified
Component: Open Journal Systems
All All
: P3 normal
Assigned To: PKP Support
Depends on:
  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:


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
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