therealwesfoster Posted May 30, 2009 Share Posted May 30, 2009 Ok, I'm getting this error: Fatal error: Cannot redeclare upload() (previously declared in C:\...\functions.php:2) in C:\...\functions.php on line 110 I've gotten this error before, and I know what the main cause is. But this isn't due to declaring a function twice (or atleast I don't see it). Here are lines 2 and 110 of functions.php Line 2 (1-3): <?php function upload($set=array()){ // line 2 global $error; Line 110 (109-111): return (empty($error)) ? true : false; } // line 110 // this is line 111. just a newline What could be the problem? All the braces match up. Wes Quote Link to comment Share on other sites More sharing options...
jxrd Posted May 30, 2009 Share Posted May 30, 2009 You're probably including the file twice or something. Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted May 30, 2009 Share Posted May 30, 2009 You'll have to post more code. I can't decipher anything from that. Though if you're going to return true or false based on empty($error), just do return empty($error); // the empty function already return a boolean value Quote Link to comment Share on other sites More sharing options...
thebadbad Posted May 30, 2009 Share Posted May 30, 2009 I'll bet that the function that ends around line 110 is called upload too. Quote Link to comment Share on other sites More sharing options...
therealwesfoster Posted May 31, 2009 Author Share Posted May 31, 2009 You're probably including the file twice or something. That was it.. it was hidden.. sorry, that's what happens when you make yourself work on the weekend. I'll bet that the function that ends around line 110 is called upload too. Negative.. it was all the same function. I'm not THAT tired Thanks everyone! Wes Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.