You are viewing the PKP Support Forum | PKP Home Wiki

Problem with func_get_args() in PHP 5.2.x

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Problem with func_get_args() in PHP 5.2.x

Postby springday » Fri Sep 14, 2012 2:20 pm

Today I received an error message on a host running PHP 5.2.x, referring to a line in DAO.inc.php:

Code: Select all
return call_user_func_array(array($this->getDataSource(), 'Concat'), func_get_args());

It told me that func_get_args() is not allowed to be used as an argument. I checked php.net, they say this function can only be used as an argument starting from PHP 5.3. So as long as OJS wants to support versions prior to PHP 5.3 there should be a work around, as suggested in the PHP article http://de3.php.net/manual/en/function.func-get-arg.php

Posts: 111
Joined: Wed Jul 25, 2012 2:56 pm
Location: Munich, Germany

Re: Problem with func_get_args() in PHP 5.2.x

Postby asmecher » Fri Sep 14, 2012 2:30 pm

Hi Kai,

The occasional strangeness of PHP strikes again. I've posted a fix for this at http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=7912; the same pattern doesn't appear to have been used elsewhere in the codebase. This is now listed on OJS 2.4.0 recommended patches.

Alec Smecher
Public Knowledge Project Team
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 5 guests