ZF-5812: Zend_Db_Select __toString() should cast its return to string

Issue Type: Bug Created: 2009-02-17T06:31:53.000+0000 Last Updated: 2009-02-17T06:34:17.000+0000 Status: Resolved Fix version(s): - 1.7.5 (16/Feb/09)

Reporter: julien PAULI (doctorrock83) Assignee: julien PAULI (doctorrock83) Tags: - Zend_Db_Select

Related issues: Attachments:


Even if we know that the return of __toString is a string, it's not in one particular use-case :

<pre class="highlight">
echo new Zend_Db_Select($db);

In that use case, the select object is empty of any value, resulting in echoing nothing, and __toString() complains about that : Catchable fatal error: Method Zend_Db_Select::__toString() must return a string value in xxxx

I suggest just to cast the return of __toString() to string.


Posted by julien PAULI (doctorrock83) on 2009-02-17T06:34:16.000+0000

Fixed at r14097

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.