Re: problems with clases, methods, HTML_Template_IT, etc.
| From: | Robert Cummings | Date: | Fri, 01 Sep 2006 22:35:45 +0000 |
| Subject: | Re: problems with clases, methods, HTML_Template_IT, etc. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-241327@lists.php.net to get a copy of this message | ||
On Fri, 2006-09-01 at 19:30 -0300, Martin Marques wrote:
> I'm buidling a system in OOP, and I have a main clase which
> objects in it. One of the objects inside is of type
> HTML_Template_IT, which I use to handle presentation tier.
>
> Now, each time the system gets executed, I get this in my php
> error log:
>
> PHP Fatal error: Call to a member function get() on a non-object
> in /xxx/xxxx/xxxx/lib/Planta.inc on line 135
>
> Line 135 has:
>
> $this->cascara->loadPrincipal($this->tpl->get("todo"));
>
> It would seam $this->tpl is not an object, but I put an output
> of is_object($this->tpl) and it gave me true.
Maybe it's the "wrong" object. Why don't you do a print_r() or
var_dump() instead of assuming the correct object type? :p
> The page gets viewed OK, so it's not really a problem of the
> program not working, but I just don't like to have "Fatal Errors"
> in my log files.
>
> BTW I with PHP 5.0.4 (it's what comes with Fedora Core 4), and
> HTML_Template_IT 1.2.1.
Maybe you should upgrade.
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com
|
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'