Issues

ZF-12286: Zend_Validate_NotEmpty throws "Array to string conversion" notice under PHP 5.4

Issue Type: Bug Created: 2012-06-13T12:17:59.000+0000 Last Updated: 2012-06-13T12:34:04.000+0000 Status: Closed Fix version(s): Reporter: Christian Kaps (akkie) Assignee: Adam Lundrigan (adamlundrigan) Tags: - Zend_Validate

Related issues: - ZF-11906

Attachments:

Description

When validating an empty array with Zend_Validate_NotEmpty then PHP 5.4 throws an "Array to string conversion" notice.

This is a new feature in PHP 5.4. See: http://php.net/manual/en/… {quote} Converting an array to a string will now generate an E_NOTICE level error, but the result of the cast will still be the string "Array". {quote}

Code to reproduce:

<pre class="highlight">
$validator = new Zend_Validate_NotEmpty();
$validator->isValid(array());

I think this is a more general problem because the error is located in the class Zend_Validate_Abstract.

Comments

Posted by Adam Lundrigan (adamlundrigan) on 2012-06-13T12:34:04.000+0000

This has been fixed in SVN trunk with r24807 (see ZF-11906)

Have you found an issue?

See the Overview section for more details.

Copyright

© 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.

Contacts