Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#8 | ctools-php-version-requirement-warning.patch | 1.54 KB | thsutton |
#6 | ctools-php-version.patch | 1.53 KB | thsutton |
Comments
Comment #1
merlinofchaos CreditAttribution: merlinofchaos commentedDOH!
That bit needs to check for PHP version then. I totally missed that was a PHP 5.2 function when I wrote that. :/
Comment #2
mithril293 CreditAttribution: mithril293 commentedThis is completely off topic, but do you get your name from the Chronicles of Amber series by Zelazny?
Comment #3
merlinofchaos CreditAttribution: merlinofchaos commentedYes I did. =)
Comment #4
mithril293 CreditAttribution: mithril293 commentedI 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.
Comment #5
merlinofchaos CreditAttribution: merlinofchaos commentedAbsolutely. 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.
Comment #6
thsutton CreditAttribution: thsutton commentedI 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()
functionctools_requirements()
and reports the version requirement if it is missing. It also adds afunction_exists()
to theif
that callserror_get_last
.Comment #7
merlinofchaos CreditAttribution: merlinofchaos commentedLet'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.
Comment #8
thsutton CreditAttribution: thsutton commentedLike so?
Comment #9
mithril293 CreditAttribution: mithril293 commentedGosh 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.
Comment #10
merlinofchaos CreditAttribution: merlinofchaos commentedCommitted! Thanks for the patch!