Re: Missing signature violation warnings suck.
| From: | Stanislav Malyshev | Date: | Wed, 09 Apr 2008 16:40:19 +0000 |
| Subject: | Re: Missing signature violation warnings suck. | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-36907@lists.php.net to get a copy of this message | ||
Hi!
public function limit( $limit, $offset = '' );
public function limit( $limit = 10, $offset = 0 )
No problems at all while development, no warnings, no errors. Now when I deployed this on a PHP 5.2 machine it bombed out, with the following *correct* message:
Fatal error: Declaration of ezcSearchFindQuerySolr::limit() must be compatible with that of ezcSearchQuery::limit() in /tmp/tmp/index.php on line 11
Why it's correct? limit() with default can extend limit without default, since every place you could call ezcSearchFindQuery::limit you also could call ezcSearchFindQuerySolr::limit. No precondition is strengthened, so I don't see a problem there.
--
Stanislav Malyshev, Zend Software Architect
stas@zend.com http://www.zend.com/
(408)253-8829 MSN: stas@zend.com