Login   Register  
PHP Classes
elePHPant
Icontem

example problem

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      Graf  >  All threads  >  example problem  >  (Un) Subscribe thread alerts  
Subject:example problem
Summary:I cannot test the class the example is not working for me
Messages:2
Author:cgrezi
Date:2007-04-04 13:25:42
Update:2007-07-20 22:45:02
 

  1. example problem   Reply  
Picture of cgrezi
cgrezi
2007-04-04 13:25:42
hello,
i am trying to test the graf class and i am getting the following error:
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in .....\graph.class.php on line 60.
can anybody help me solve this problem.
Thanks in advance

  2. Re: example problem   Reply  
Picture of Sander Weyens
Sander Weyens
2007-07-20 22:45:02 - In reply to message 1 from cgrezi
This is because you are using php5, you can fix this by casting the values that cause an error to array.

Or, apply this:

FIND:
//at line 60

$this -> routs[$y] = array_merge($this -> routs[$y], $this -> s[$i]);

REPLACE WITH:

$this -> routs[$y] = array_merge((array)$this -> routs[$y], (array)$this -> s[$i]);


FIND:
//at line 68

$this -> routs[$y] = array_merge($this -> routs[$y], $sum);

REPLACE WITH

$this -> routs[$y] = array_merge((array)$this -> routs[$y], $sum);