Do not convert incorrect code types to integer automatically.
authorGunnar Wrobel <p@rdus.de>
Thu, 11 Feb 2010 08:29:43 +0000 (09:29 +0100)
committerGunnar Wrobel <wrobel@temple.(none)>
Thu, 11 Feb 2010 10:07:58 +0000 (11:07 +0100)
commitbe21276bd434285ab8900060f8a99353dad778b4
tree1663ccf657a03a4a3d8bf95c86edbf5872b01d2f
parent6b8df9119dc8fc9727236940030f7c1b8fb55559
Do not convert incorrect code types to integer automatically.

If $code is null it will be converted to 0 by the default Exception
anyhow.

If $code contains a string it will elicit a Fatal Error. But that is
okay and should not be hidden. In nearly all cases where we provided a
string as $code it was a simple coding error that needs to be fixed.

There may be cases where the code is a value returned from another
library. If it is uncertain that the library ensures that the return
value is an integer then it can be cast into an integer before
providing it to the exception.
framework/Exception/lib/Horde/Exception.php
framework/Exception/lib/Horde/Exception/LastError.php
framework/Exception/lib/Horde/Exception/NotFound.php
framework/Exception/lib/Horde/Exception/PermissionDenied.php