Ash www.ashleysheridan.co.uk |
--- Begin Message ---
- To: PHP list - not junk <php-general@xxxxxxxxxxxxx>
- Subject: Does this seem wrong to anyone else?
- From: Stephen Johnson <stephen@xxxxxxxxxxxxxxxx>
- Date: Wed, 20 Aug 2008 14:09:15 -0700
- Delivery-date: Wed, 20 Aug 2008 22:09:58 +0100
- Envelope-to: ash@xxxxxxxxxxxxxxxxxxxx
- Thread-index: AckDCQA3c5Lp6qzNTTmkLCfsJ510lA==
- Thread-topic: Does this seem wrong to anyone else?
- User-agent: Microsoft-Entourage/12.12.0.080729
I am debugging someone else¹s code, and this is what they have : 1055 function mkdir_recursive($pathname, $mode) 1056 { 1057 is_dir(dirname($pathname)) || mkdir_recursive(dirname($pathname), $mode); 1058 return is_dir($pathname) || @mkdir($pathname, $mode); 1059 } The part that bothers me is that mkdir_recursive calls itself from within itself. I am not an expert on this particular type of thing, and maybe that is allowed, but it seems wrong to me, and this error is being generated: Fatal error: Call to undefined function mkdir_recursive() in xxxxx.php on line 1057 -- 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! --
--- End Message ---
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php