Here's an example of what I'm using:
The above is a working example but it is not my original code. It should pump out a user error of "You should have given, $again!" but it doesn't appear to do anything at all.
Is this a bug? If it is, is there a work around?
---------------------------------------
Code:
class LIB
{
function test ( $again = "" )
{
if ( !@self::junk( $again ) )
{
// Report.
user_error( "You should have given, \$again!",
E_USER_ERROR );
}
print( "Hi." );
}
function junk ( $var = "" )
{
if ( empty( $var ) )
{
// Report.
user_error( "Argument, \$var, is required.",
E_USER_ERROR );
return( false );
}
}
}
LIB::test( );
The above is a working example but it is not my original code. It should pump out a user error of "You should have given, $again!" but it doesn't appear to do anything at all.
Is this a bug? If it is, is there a work around?
---------------------------------------