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
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
] 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
: 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
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
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
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
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
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
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
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),
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
12 matches
Mail list logo