php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #48090 Wrong return value documented
Submitted: 2009-04-27 19:11 UTC Modified: 2009-04-27 20:12 UTC
From: antronin at gmail dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: Ubuntu 9.04
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: antronin at gmail dot com
New email:
PHP Version: OS:

 

 [2009-04-27 19:11 UTC] antronin at gmail dot com
Description:
------------
Documentation mentiones that function restore_exception_handler() always returns True, which is False. It returns the last Exception handler set up if any.

Reproduce code:
---------------
set_exception_handler(array('ExceptionHandler', 'handleException'));
restore_exception_handler();


Expected result:
----------------
True

Actual result:
--------------
array('ExceptionHandler', 'handleException')

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-27 19:19 UTC] bjori@php.net
No it doesn't.
 [2009-04-27 19:21 UTC] philip@php.net
set_exception_handler() returns the previously defined exception 
handler, perhaps you are mixing up the two? A version of your code 
returns true for me.
 [2009-04-27 20:11 UTC] antronin at gmail dot com
Please close the ticket! I cannot reproduce the issue, so I'm considering it was my fault. Sorry!
 [2009-04-27 20:12 UTC] danbrown@php.net
Done.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 08:00:01 2026 UTC