Re: [PHP] Does this seem wrong to anyone else?

2008-08-21 Thread Yeti
PROTECTED] To: Robert Cummings [EMAIL PROTECTED] Date: Thu, 21 Aug 2008 00:52:09 +0200 Subject: Re: [PHP] Does this seem wrong to anyone else? Robert Cummings schreef: On Wed, 2008-08-20 at 14:09 -0700, Stephen Johnson wrote: I am debugging someone else¹s code, and this is what they have : 1055

Re: [PHP] Does this seem wrong to anyone else?

2008-08-21 Thread Jochem Maas
this seem wrong to anyone else? Robert Cummings schreef: On Wed, 2008-08-20 at 14:09 -0700, Stephen Johnson wrote: I am debugging someone else¹s code, and this is what they have : 1055function mkdir_recursive($pathname, $mode) 1056{ 1057is_dir(dirname($pathname)) || mkdir_recursive

Re: [PHP] Does this seem wrong to anyone else?

2008-08-21 Thread daniel danon
] Does this seem wrong to anyone else? Robert Cummings schreef: On Wed, 2008-08-20 at 14:09 -0700, Stephen Johnson wrote: I am debugging someone else¹s code, and this is what they have : 1055function mkdir_recursive($pathname, $mode) 1056{ 1057is_dir(dirname($pathname

Re: [PHP] Does this seem wrong to anyone else?

2008-08-21 Thread Jochem Maas
: Jochem Maas [EMAIL PROTECTED] To: Robert Cummings [EMAIL PROTECTED] Date: Thu, 21 Aug 2008 00:52:09 +0200 Subject: Re: [PHP] Does this seem wrong to anyone else? Robert Cummings schreef: On Wed, 2008-08-20 at 14:09 -0700, Stephen Johnson wrote: I am debugging someone else¹s code, and this is what

[PHP] Does this seem wrong to anyone else?

2008-08-20 Thread Stephen Johnson
I am debugging someone else¹s code, and this is what they have : 1055function mkdir_recursive($pathname, $mode) 1056{ 1057is_dir(dirname($pathname)) || mkdir_recursive(dirname($pathname), $mode); 1058return is_dir($pathname) || @mkdir($pathname, $mode); 1059} The

Re: [PHP] Does this seem wrong to anyone else?

2008-08-20 Thread Robert Cummings
On Wed, 2008-08-20 at 14:09 -0700, Stephen Johnson wrote: I am debugging someone else¹s code, and this is what they have : 1055function mkdir_recursive($pathname, $mode) 1056{ 1057is_dir(dirname($pathname)) || mkdir_recursive(dirname($pathname), $mode); 1058return

Re: [PHP] Does this seem wrong to anyone else?

2008-08-20 Thread Ashley Sheridan
It's perfectly acceptable to have a function call itself, and one of the first examples in books is a recursive function for factorial numbers, and I've used them on more than one occasion to give directory listings. For the life of me though, I can't understand why it would be giving you the

Re: [PHP] Does this seem wrong to anyone else?

2008-08-20 Thread Thorsten Suckow-Homberg
1055function mkdir_recursive($pathname, $mode) 1056{ 1057is_dir(dirname($pathname)) || mkdir_recursive(dirname($pathname), $mode); 1058return is_dir($pathname) || @mkdir($pathname, $mode); 1059} Is this function defined within a class? From which scope do you call

Re: [PHP] Does this seem wrong to anyone else?

2008-08-20 Thread Stut
On 20 Aug 2008, at 22:09, Stephen Johnson wrote: I am debugging someone else’s code, and this is what they have : 1055function mkdir_recursive($pathname, $mode) 1056{ 1057is_dir(dirname($pathname)) || mkdir_recursive(dirname($pathname), $mode); 1058return

Re: [PHP] Does this seem wrong to anyone else?

2008-08-20 Thread Stephen Johnson
Thanks everyone ... It was a brain fart ... Long bad day today, and I am not paying proper attention ... :) -- Stephen Johnson c | eh The Lone Coder http://www.thelonecoder.com continuing the struggle against bad code http://www.fortheloveofgeeks.com I¹m a geek and I¹m OK! -- -- PHP

Re: [PHP] Does this seem wrong to anyone else?

2008-08-20 Thread Jochem Maas
Robert Cummings schreef: On Wed, 2008-08-20 at 14:09 -0700, Stephen Johnson wrote: I am debugging someone else¹s code, and this is what they have : 1055function mkdir_recursive($pathname, $mode) 1056{ 1057is_dir(dirname($pathname)) || mkdir_recursive(dirname($pathname),

Re: [PHP] Does this seem wrong to anyone else?

2008-08-20 Thread Ashley Sheridan
Whats even more fun is inheriting somebody elses' *undocumented* code. Oh, and if just happens to be in a strange programming language that you don't know too well, all the better! Sounds awful, but it did happen to me once :-/ Ash www.ashleysheridan.co.uk ---BeginMessage--- Robert Cummings