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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ryosuke_i_628 at yahoo dot co dot jp
New email:
PHP Version: OS:

 

 [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

Add a Patch

Pull Requests

Add a Pull Request

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 Mar 28 09:01:26 2024 UTC