ZF-11324: Example in docs throws a warning in constructor on PHP 5.3
The following example from official docu-site 0 ends up with a php-warning:
Code: $d = new \Zend_Date('13.04.2006', array('date_format' => 'dd.MM.yyyy'));
Warning: defined() expects parameter 1 to be string, array given in /usr/share/php/libzend-framework-php/Zend/Date.php on line 155
After studying the source code, i think the documentation is not right at this point.
The following example works perfectly:
$d = new \Zend_Date('13.04.2006', 'dd.MM.yyyy');
it seems for me, the date-format must be a string, an array with named options is not wanted here.
So only the documentation should be changed. Regards, Hagen
PHP 5.3.2-1ubuntu4.7 with Suhosin-Patch (cli) (built: Jan 12 2011 18:36:55) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies with Xdebug v2.0.5, Copyright (c) 2002-2008, by Derick Rethans with Suhosin v0.9.29, Copyright (c) 2007, by SektionEins GmbH