cvs: pear /System_Command Command.php

From: Date: Thu, 15 Dec 2005 15:04:23 +0000
Subject: cvs: pear /System_Command Command.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-36880@lists.php.net to get a copy of this message
cconstantine Thu Dec 15 15:04:23 2005 EDT Modified files: /pear/System_Command Command.php Log: fix #6199: no longer pass nul to System::which() from which() http://cvs.php.net/viewcvs.cgi/pear/System_Command/Command.php?r1=1.6&r2=1.7&diff_format=u Index: pear/System_Command/Command.php diff -u pear/System_Command/Command.php:1.6 pear/System_Command/Command.php:1.7 --- pear/System_Command/Command.php:1.6 Sun Oct 23 10:36:31 2005 +++ pear/System_Command/Command.php Thu Dec 15 15:04:23 2005 @@ -18,7 +18,7 @@ // | Author: Dan Allen <dan@mojavelinux.com> // +----------------------------------------------------------------------+ -// $Id: Command.php,v 1.6 2005/10/23 10:36:31 arnaud Exp $ +// $Id: Command.php,v 1.7 2005/12/15 15:04:23 cconstantine Exp $ // }}} // {{{ includes @@ -54,7 +54,7 @@ * * @author Anders Johannsen <anders@johannsen.com> * @author Dan Allen <dan@mojavelinux.com> - * @version $Revision: 1.6 $ + * @version $Revision: 1.7 $ */ // }}} @@ -429,7 +429,13 @@ */ function which($in_cmd) { - return System::which($in_cmd); + // only pass non-empty strings to System::which() + if (!is_string($in_cmd) || '' === $in_cmd) { + return(false); + } + + // explicitly pass false as fallback value + return System::which($in_cmd, false); } // }}}

« previous php.pear.cvs (#36880) next »