ID:               29273
 User updated by:  AxelLuttgens at swing dot be
 Reported By:      AxelLuttgens at swing dot be
 Status:           Closed
 Bug Type:         Documentation problem
 Operating System: Mac OS 10.3.4
 PHP Version:      4.3.8
 New Comment:

Thanks for your quick and precise reply,
Axel


Previous Comments:
------------------------------------------------------------------------

[2004-07-20 11:55:33] [EMAIL PROTECTED]

This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation
better.

This function returns false if wrong error_type is specified, true
otherwise.

------------------------------------------------------------------------

[2004-07-20 10:46:25] AxelLuttgens at swing dot be

Description:
------------
The documentation for trigger_error() indicates:

    void trigger_error ( string error_msg [, int error_type])

But trigger_error() seems to return TRUE on my system.

Now, I find it handy to have trigger_error() as a true function (as
opposed to "language constructs", which often tend to make code more
convoluted than needed).

But does it always return TRUE?
Or may it sometimes return FALSE?
Or is it a bug in the code, the documentation then being correct?

Reproduce code:
---------------
# both print "1" on my system
echo is_bool(trigger_error('a triggered one'));
echo trigger_error('a triggered one') === TRUE;

Expected result:
----------------
# According to the documentation, I would have expected
# something like this:
# this would print ""
echo is_bool(trigger_error('a triggered one'));
# this would print "1"
echo is_null(trigger_error('a triggered one'));




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=29273&edit=1

Reply via email to