php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72629 Caught exception assignment to variables ignores references
Submitted: 2016-07-20 08:50 UTC Modified: -
From: ryosuke_i_628 at yahoo dot co dot jp Assigned:
Status: Closed Package: *General Issues
PHP Version: 7.1.0alpha3 OS: OSX 10.11.5
Private report: No CVE-ID: None
 [2016-07-20 08:50 UTC] ryosuke_i_628 at yahoo dot co dot jp
Description:
------------
Caught exception assignment to variables ignores references.
Note that PHP has this bug while HHVM hasn't.

Test on 3v4l: https://3v4l.org/neGAE

Test script:
---------------
<?php

$var = null;
$e = &$var;

try {
    throw new Exception;
} catch (Exception $e) { }

assert('$e !== null');
assert('$var !== null');

Expected result:
----------------
No outputs.

Actual result:
--------------
Warning: assert(): Assertion "$var !== null" failed

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-07-20 09:00 UTC] laruence@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=97c0b133c560e81bafbedaa321216b8862e1bdfc
Log: Fixed bug #72629 (Caught exception assignment to variables ignores references).
 [2016-07-20 09:00 UTC] laruence@php.net
-Status: Open +Status: Closed
 [2016-07-20 11:29 UTC] davey@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=97c0b133c560e81bafbedaa321216b8862e1bdfc
Log: Fixed bug #72629 (Caught exception assignment to variables ignores references).
 [2016-10-17 10:10 UTC] bwoebi@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=97c0b133c560e81bafbedaa321216b8862e1bdfc
Log: Fixed bug #72629 (Caught exception assignment to variables ignores references).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 13:01:29 2024 UTC