View Single Post
Old 12-03-2012, 04:18 PM   PM User | #4
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,662
Thanks: 4
Thanked 2,452 Times in 2,421 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
That won't be a scope issue. That sounds like an order of execution issue. error_get_last should work independently of any scope:
PHP Code:
error_reporting(0);

function 
func()
{
    print 
$var;
}

func();
print_r(error_get_last()); 
will result in
Code:
Array
(
    [type] => 8
    [message] => Undefined variable: var
    [file] => /t.php
    [line] => 7
)
So the problem is that the error is triggered sometime after the processing has occurred where you have put it.
Fou-Lu is offline   Reply With Quote