PHP Classes

Problems on PHP 5.2.9 at calling Color::color()

Recommend this page to a friend!

      Graidle  >  All threads  >  Problems on PHP 5.2.9 at calling...  >  (Un) Subscribe thread alerts  
Subject:Problems on PHP 5.2.9 at calling...
Summary:Problem calling color method on new PHP 5.2.9
Messages:2
Author:Daniel Jaeger
Date:2009-06-17 22:04:37
Update:2011-01-04 18:40:58
 

  1. Problems on PHP 5.2.9 at calling...   Reply   Report abuse  
Picture of Daniel Jaeger Daniel Jaeger - 2009-06-17 22:04:37
Hi,

I receive on my new setup xampp with 5.2.9 ( on mac os X) an error for the line 66 of the graidle.php
"Fatal error: Non-static method Color::color() cannot be called statically, assuming $this from incompatible context in .../classes/graidle/graidle.php on line 66"

This seems to stay in relation with changes in the new PHP releases on 5.2.6 and above (as I read in other forums).

A work around for me to call the method is this:

$color = new Color();
$this->color = $color->color();

instead of

Color::color();

And changing the line 22 of the Color class from this
$this->color = array(
to
return array(

I guess thats pretty weak...

Do you know about this problem?


Thanks
and best wishes

Daniel

  2. Re: Problems on PHP 5.2.9 at calling...   Reply   Report abuse  
Picture of Alessio Glorioso Alessio Glorioso - 2011-01-04 18:40:58 - In reply to message 1 from Daniel Jaeger
Hi, please update to Graidle v0.6 available at sourceforge: https://sourceforge.net/projects/graidle/files/Graidle/