-1

Error:

Fatal error: Can't use function return value in write context in /home/u566013465/public_html/2/inc/functions.php on line 2361 line 2361:

if( empty( shell_exec("which $command") ) ) {
    return false;
}

if( $config['debug'] ) {
    $start = microtime(true);
}

I have PHP 5.3

Rizier123
  • 58,877
  • 16
  • 101
  • 156
malamut2014
  • 19
  • 1
  • 3
  • @Rizier123 If you use `return` out side of function, it will exit from current file! – undone Jan 05 '15 at 19:39
  • possible duplicate of [Can't use method return value in write context](http://stackoverflow.com/questions/1075534/cant-use-method-return-value-in-write-context) – Eineki Jan 05 '15 at 19:40
  • Very nice statement of the error message you are receiving. Thanks very much for the info :) – Lee Apr 29 '15 at 16:27

1 Answers1

1

empty function can be used only for variables and if you pass anything else, it will throw a parse error:

$var  = shell_exec("which $command") ;
 if( empty( $var ) ) {
    return false;
}

if( $config['debug'] ) {
    $start = microtime(true);
}
undone
  • 7,857
  • 4
  • 44
  • 69