well then, I’d remove it and check with var_dump() the status of $Check in every concerned script.
113 Replies - 3985 Views - Last Post: 23 March 2013 - 11:52 PM
#92
Re: First foray into OOP: Correct implementation?
Posted 13 March 2013 - 05:53 AM
Aye captain! 
Checking now!
Checking now!
#93
Re: First foray into OOP: Correct implementation?
Posted 13 March 2013 - 06:03 AM
Alright, it looks like it's in there.
object(content)[9]
protected 'Check' =>
object(check)[3]
protected 'pdo' =>
object(PDO)[2]
#94
Re: First foray into OOP: Correct implementation?
Posted 13 March 2013 - 06:07 AM
is that the $Check variable?
#95
Re: First foray into OOP: Correct implementation?
Posted 13 March 2013 - 06:36 AM
Yepper
#96
Re: First foray into OOP: Correct implementation?
Posted 13 March 2013 - 06:44 AM
and the loggedIn() method belongs to the check class? then $Check->loggedIn() must fail since $Check is an instance of content.
#97
Re: First foray into OOP: Correct implementation?
Posted 13 March 2013 - 06:53 AM
Wait, I'm sorry. I misread your question. I am incorrect, that is the $Content variable.
Here is Check.
Here is Check.
object(check)[3]
protected 'pdo' =>
object(PDO)[2]
#98
Re: First foray into OOP: Correct implementation?
Posted 13 March 2013 - 06:54 AM
is that from navbar.inc.php?
#99
Re: First foray into OOP: Correct implementation?
Posted 13 March 2013 - 07:01 AM
Yes
#100
Re: First foray into OOP: Correct implementation?
Posted 13 March 2013 - 07:04 AM
hm. do you still get the error?
#101
Re: First foray into OOP: Correct implementation?
Posted 13 March 2013 - 07:09 AM
Yep. No change.
If I am not logged in and try to access a protected page it gives the undefined error, and if I am logged in and try to access a page logged in users aren't supposed to access it gives the same error.
If I am not logged in and try to access a protected page it gives the undefined error, and if I am logged in and try to access a page logged in users aren't supposed to access it gives the same error.
#102
Re: First foray into OOP: Correct implementation?
Posted 13 March 2013 - 07:14 AM
is the creation of the $Check variable based upon any condition?
#103
Re: First foray into OOP: Correct implementation?
Posted 13 March 2013 - 07:27 AM
No, here is the code
$Check = new check($db);
#104
Re: First foray into OOP: Correct implementation?
Posted 20 March 2013 - 12:18 PM
Alright, I'm trying to use FirePHP to debug the script but. . . I can't make heads or tails of how to use the darn thing.
#105
Re: First foray into OOP: Correct implementation?
Posted 20 March 2013 - 01:27 PM
Darkranger85, on 20 March 2013 - 07:18 PM, said:
Alright, I'm trying to use FirePHP to debug the script but. . . I can't make heads or tails of how to use the darn thing.
FirePHP seems intended for Ajax requests rather than general PHP debugging.
There are PHP debuggers available. I seem to recall that the one in NetBeans was the easiest to configure.
Personally I tend to regard them as more trouble than they are worth. Tactical use of print_r, var_dump, echoes, et al., together with enabling all error reporting, is quicker and easier. By the time you've struggled to configure, and learn to use, the debugger, you could have found the error with a few simple echoes
This post has been edited by andrewsw: 20 March 2013 - 01:39 PM
|
|

New Topic/Question
Reply




MultiQuote



|