I'm not 100% on the specifics, but before 5.2.0 the __toString() magic
method was only called in certain contexts, I think you example below
should work because it's in an echo context, but perhaps it's more
complicated than that. Anyway, the easiest solution would be to call
__toString() manually:
<?php echo $this->headTitle()->__toString()."\n"; ?>
Endijs Lisovskis wrote:
Hi!
If such problems were discussed before - please excuse me. I'm new to this
mailing list and I couldn't find answer in archive.
OK - now about problem. I developed web application on server with PHP
5.2.5, but now I need to put scripts on server with PHP 5.1.6. But there is
a problem (I think it's because of PHP 5.1.6). When I try to echo View
helpers in Views I receive object ids instead of strings.
For example. If I use:
<head>
<?php echo $this->headTitle()."\n"; ?>
</head>
Head <title> is not displayed, but instead I receive something like "Object
id #40".
On server with PHP 5.2.5 everything is fine.
Is there any quick solutions for such problems?
Thanks!
--
Jack