PHP Classes

problem running class

Recommend this page to a friend!

      External program executor  >  All threads  >  problem running class  >  (Un) Subscribe thread alerts  
Subject:problem running class
Summary:running gives error
Messages:2
Author:mike solomon
Date:2011-11-18 16:25:01
Update:2011-11-18 20:25:22
 

  1. problem running class   Reply   Report abuse  
Picture of mike solomon mike solomon - 2011-11-18 16:25:01
I tried to use this class but I am getting the error

Fatal error: Call to a member function arg() on a non-object in /home/www/joomla/ivyadmin/jumi/compare.php on line 27

Just to test it I replaced my file with example.php and get the same error Fatal error: Call to a member function arg() on a non-object

My code is


require_once("external.class.php");

$stream = External::program("sdiff")
->arg("-s")
->arg("-w 200")
->args(array("${master}${file}","${slave}${file}"))
->run();

print $stream;

Any help will be much appreciated



  2. Re: problem running class   Reply   Report abuse  
Picture of Mark Schrer Mark Schrer - 2011-11-18 20:25:22 - In reply to message 1 from mike solomon
In php5.3:

PHPUNIT_FRAMEWORK_ERROR_NOTICE
Only variable references should be returned by reference

&program is not supported in PHP5.3 and above