[kwlug-disc] PHP code question

Bill Traynor btraynor at gmail.com
Wed Sep 7 14:32:44 EDT 2011


On Wed, Sep 7, 2011 at 14:11, Chris Frey <cdfrey at foursquare.net> wrote:

> 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


This is what I did as that's actually my pastebin.


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

Nor am I, and I know even less about PHP.


>
> - Chris
>
>
> _______________________________________________
> kwlug-disc mailing list
> kwlug-disc at kwlug.org
> http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20110907/0795fdd0/attachment.htm>


More information about the kwlug-disc mailing list