[kwlug-disc] PHP code question
Chris Frey
cdfrey at foursquare.net
Wed Sep 7 14:11:30 EDT 2011
On Wed, Sep 07, 2011 at 10:39:56AM -0400, Bill Traynor wrote:
> Line 55 is this function:
>
> function ctools_php_ctools_access_check($__conf, $contexts) {
> $access = eval($__conf['php']);
> return $access;
> }
>
> As an admitted PHP neophyte, I have no idea how to add the Exception. As
> fixing this bug as fast as possible is my priority right now, can anyone
> tell me how to add the Exception to that function?
Probably something like the code at:
http://php.net/manual/en/language.exceptions.php
Or like:
http://pastebin.com/UV8Fg2Lh
I'd also be interested in what $__conf['php'] holds, and would be
logging that somewhere, temporarily, regardless of condition.
If you can reliably reproduce the bug, I'd probably add a simple echo or
print and capture it that way. If not, then I'd log it to a file in
/tmp somewhere, before the eval(), and write "success" after the eval,
and watch for the ones that don't succeed.
I'm not a Drupal expert though.
- Chris
More information about the kwlug-disc
mailing list