Fatal error: Call to a member function setFlags() on a non-object in /class_appcontroller.php
When I access myadopts/add I get this error:
[spoiler] its driving me crazy!! [/spoiler] Fatal error: Call to a member function setFlags() on a non-object in full_path_hidden/class_appcontroller.php on line 192; So I added two functions. myadopts.php Code:
my adoptsview.php Code:
// |
Re
Oookay... I'm not exactly great with v1.3.4 or coding, but just to check...
in your adoptsview.php: $eatForm = new Form("eaters", "eater", "post"); It looks like you're trying to post the form to a page called 'eater' - at least that's how it works with my version. Try this: replace $eatForm = new Form("eaters", "eater", "post"); with $eatForm = new Form("eaters", "", "post"); In adoptsview.php, add this to the add function right below $document->setTitle("Do you want to eat me"); if($mysidia->input->post("submit")){ put your "eater" code here? } I'm not sure if this is what you were looking for, but I hope it works out for you! |
Don't believe that was the issue:
Believe the issue is in the constructor of myadopts.php Code:
if( $this->action != "index"){ |
Re
Quote:
|
Quote:
I will either be creating a if elseif then with the $this->action or or just use a separate page. =0 |
Other such pages Ive seen dont use try.... even though they aim for the same effect.
|
The try statement is better then using IF statements for error checking/handling. Especially when you need a few blocks of code to check for errors opposed to checking each line 1 by 1 for errors.
Maybe HOF hasn't gotten around to rest of pages. |
Hi! I think I know why this is happening. Are the two codes you posted the entire files, or just a section?
I was a bit confused with this quite some time ago. Did you construct myadopts like this? I suspect that your were missing the "catch" statement in the _construct function. PHP Code:
|
See previous post, what I posted about Wallie.
Code I replaced with mine. I added a $safelist array and checked if in it. Code:
class MyadoptsController extends AppController{ |
Quote:
Other than that, I really have no idea as to what could possibly have gone wrong. I'm assuming everything works fine if you revert the file to its original state? :L |
All times are GMT -5. The time now is 06:14 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.