Re: Console_GetOpt and mkdir bug
| From: | Stig S. Bakken | Date: | Sat, 12 Oct 2002 14:22:22 +0000 |
| Subject: | Re: Console_GetOpt and mkdir bug | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-10034@lists.php.net to get a copy of this message | ||
On Sat, 2002-10-12 at 14:18, Pierre-Alain Joye wrote:
> Hello,
>
> I post a bug about mkdir, you can reproduce it with pear_system.phpt
> test suites.
>
> http://marc.theaimsgroup.com/?l=pear-dev&m=103433606716980&w=2
>
> In Console_Getopt:getopt() :
>
> if (isset($args[0]{0}) && $args[0]{0} != '-') {
> array_shift($args);
> }
>
> That drops the 1st dir argument passed to System::mkDir();
>
> Do you why it automaticly drop it if it does not start with '-' ?
This is to make getopt work for both $argv[0...] and $argv[1...].
> Just to know if the problem comes from the call or from getOpt itself.
It's a problem with the call, since the Console_Getopt API changed in
PHP 4.2.
- Stig
--
Stig Sæther Bakken, Fast Search & Transfer ASA, Trondheim, Norway
http://pear.php.net/wishlist.php/ssb