php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72102 Segfault when using func_get_args as error handler
Submitted: 2016-04-25 16:45 UTC Modified: 2017-12-22 23:18 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: nikic@php.net Assigned: nikic (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 7.0.6RC1 OS:
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: nikic@php.net
New email:
PHP Version: OS:

 

 [2016-04-25 16:45 UTC] nikic@php.net
Description:
------------
<?php
set_error_handler('func_get_args');
function test($a) {
    echo $undef;
}
test(1);

Don't ask me what the expected result should be, but it shouldn't crash...


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-05-17 05:50 UTC] krakjoe@php.net
-Assigned To: +Assigned To: nikic
 [2016-05-17 05:50 UTC] krakjoe@php.net
Just assigning to you so that this is not forgotten when the solution is merged.
 [2016-07-30 19:59 UTC] kalle@php.net
Wasn't this fixed in 7.1 with the restriction to calls to func_get_args in a dynamic context?
 [2016-07-31 09:23 UTC] cmb@php.net
For reference: <https://3v4l.org/TA4CW>. It seems we still a need
a solution for PHP 7.0, or we'd have to fix the docs:

| Generates a warning if called from outside of a user-defined
| function.
 [2017-12-22 23:18 UTC] nikic@php.net
-Status: Assigned +Status: Closed
 [2017-12-22 23:18 UTC] nikic@php.net
Fixed in 7.1 and 7.0 is out of active support, so closing this.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Sep 17 08:00:02 2025 UTC