lordphate Posted July 19, 2006 Share Posted July 19, 2006 [code]/** * trigger Smarty error * * @param string $error_msg * @param integer $error_type */ function trigger_error($error_msg, $error_type = E_USER_WARNING) <---- 1601 { trigger_error("Smarty error: $error_msg", $error_type); }[/code]Fatal error: Call to undefined function: trigger_error() in /home/arshemn/public_html/test/class/smarty/Smarty.class.php on line 1601 Quote Link to comment Share on other sites More sharing options...
micah1701 Posted July 20, 2006 Share Posted July 20, 2006 not sure what this is supposed to do...but a couple things.1) function trigger_error($error_msg, $error_type = E_USER_WARNING)I don't think you can give a value to $error_type here. I could be wrong, but you should be passing this var to the function, not defining it here.2) function trigger_error($error_msg, $error_type = E_USER_WARNING) <---- 1601 { trigger_error("Smarty error: $error_msg", $error_type); }it looks like you are calling the function from within its self.I don't think you can do that. what is the function supposed to do? ??? Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted July 20, 2006 Share Posted July 20, 2006 Micah,That is valid, what it does is predefine the var, so that it is not required to be passed when the function is called. i.e., he can call it as[code]trigger_error("this is an error");[/code]which will trigger a warningor [code]trigger_error("this is an error", E_NOTICE);[/code]which will trigger a notice Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.