On Tue, 17 Sep 2013, Marc-Etienne VARGENAU wrote:
> - * @return bool Success or not
> */
> function __construct($id = false, $res = false) {
> $this->Error();
> if (!$id) {
> //setting up an empty object
> //probably going to call create()
> - return true;
> + return;
> }
> if (!$res) {
> if (!$this->fetchData($id)) {
> - return false;
> + return;
> }
I’m very surprised at this diff, but it turns out that
there’s no change – http://php.net/manual/en/language.oop5.decon.php
says that constructors return void, and “the web” suggests – e.g. at
http://stackoverflow.com/questions/2214724/php-constructor-to-return-a-null
– to throw an Exception instead and catch in the caller, possibly by
wrapping the new call in a factory.
This kinda sucks.
//mirabilos
--
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-314
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Boris Esser, Sebastian Mancke
_______________________________________________
Fusionforge-general mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-general