php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48569 Called from the global scope error on code that worked before
Submitted: 2009-06-16 17:29 UTC Modified: 2009-07-28 12:36 UTC
Votes:6
Avg. Score:3.7 ± 0.9
Reproduced:4 of 4 (100.0%)
Same Version:1 (25.0%)
Same OS:1 (25.0%)
From: ken at smallboxsoftware dot net Assigned: dmitry (profile)
Status: Wont fix Package: Scripting Engine problem
PHP Version: 5.3.0RC3 OS: RHEL 5.3
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: ken at smallboxsoftware dot net
New email:
PHP Version: OS:

 

 [2009-06-16 17:29 UTC] ken at smallboxsoftware dot net
Description:
------------
"Called from the global scope" error now appears in situations where it did not previously. 

for example: 

<?php
function foo() {
 include "macro_to_process_arguments.php";
}
?>

<?php
// macro_to_process_arguments.php
$args = func_get_args();
?>

Now triggers an error. 

Reproduce code:
---------------
Called from the global scope

Expected result:
----------------
Not to get the above error message. 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-28 12:34 UTC] dmitry@php.net
It's not going to be fixed. It worked before not on purpose, but because of wired func_get_args() implementation.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Jul 04 15:01:36 2025 UTC