I'm not sure how big of a deal this is, but there is no PHP minimum requirement in ctools.info. ctools.module references the function error_get_last(), which only exists in PHP >= 5.2. I just noticed this today while trying to debug some odd redirect behaviour on one of my sites.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

merlinofchaos’s picture

DOH!

That bit needs to check for PHP version then. I totally missed that was a PHP 5.2 function when I wrote that. :/

mithril293’s picture

This is completely off topic, but do you get your name from the Chronicles of Amber series by Zelazny?

merlinofchaos’s picture

Yes I did. =)

mithril293’s picture

I absolutely loved the series. I've read it several times... and am sad that the author is no longer with us to write more books!

I was wondering, to triage our installation, would there be any harm in commenting out the function call? I have reason to believe that PHP erroring out there is possibly causing other shutdown functions to not be processed. This, in turn, may have something to do with us getting primary key violations on the menu_router table. This is just a hypothesis, but its the best I have to go on at the moment. I just learned about the xdebug module and installed it yesterday. Today I should have a better picture of what is going on.

merlinofchaos’s picture

Absolutely. THis is just an improvement on error reporting. If you comment it out (and possibly a line or two after it) it will simply fail to report errors. I can see where it might obscure the real error that is happening.

thsutton’s picture

Status: Active » Needs review
FileSize
1.53 KB

I just encountered this in moving code to a production server running PHP 5.1 and hacked up the attached patch before I looked for an issue.

The patch adds a check for the error_get_last() function ctools_requirements() and reports the version requirement if it is missing. It also adds a function_exists() to the if that calls error_get_last.

merlinofchaos’s picture

Let's make that a requirement warning, not an error. The extra error reporting is not a critical feature, but it is very nice to have.

thsutton’s picture

mithril293’s picture

Gosh I love open source communities. Sorry I didn't follow through with the patch. I've been so busy I haven't had time! Thanks for picking it up.

merlinofchaos’s picture

Status: Needs review » Fixed

Committed! Thanks for the patch!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.