Vivid Lust Posted November 21, 2010 Share Posted November 21, 2010 Something strange is happning, line producing the error: if( ($this->subject == "") || ($this->message == "") ){ Any ideas guys? thanks lots!! Quote Link to comment https://forums.phpfreaks.com/topic/219365-fatal-error-call-to-undefined-function-in/ Share on other sites More sharing options...
PFMaBiSmAd Posted November 21, 2010 Share Posted November 21, 2010 The line of code you posted out of context does not produce that error (tested). I put that line into a valid class definition/method definition and that line is syntactically correct. Something prior to that is causing the error. Quote Link to comment https://forums.phpfreaks.com/topic/219365-fatal-error-call-to-undefined-function-in/#findComment-1137477 Share on other sites More sharing options...
Vivid Lust Posted November 21, 2010 Author Share Posted November 21, 2010 function send($loggedEmail,$subject,$message,$recipientID) { $this->subject = $subject; $this->message = $message; echo "s".$this->subject; echo "m".$this->message; if( ($this->subject == "") || ($this->message == "") ){ echo "apps"; } } if( isset($_POST['sendForm']) ){ $message->send($_POST['email'],$_POST['subject'],$_POST['message'],$recipient->id); } Quote Link to comment https://forums.phpfreaks.com/topic/219365-fatal-error-call-to-undefined-function-in/#findComment-1137489 Share on other sites More sharing options...
BlueSkyIS Posted November 21, 2010 Share Posted November 21, 2010 what is $this? Quote Link to comment https://forums.phpfreaks.com/topic/219365-fatal-error-call-to-undefined-function-in/#findComment-1137504 Share on other sites More sharing options...
Vivid Lust Posted November 21, 2010 Author Share Posted November 21, 2010 class message { var $recipientID; //id of member message is being sent to var $errorCount; // how many errors have been found var $error = array(); // array of he errors found var $subject; // subject of the message var $message; //the message that is being sent function __construct() { $errorCount = 0; } function send($loggedEmail,$subj ... ... .. ... Quote Link to comment https://forums.phpfreaks.com/topic/219365-fatal-error-call-to-undefined-function-in/#findComment-1137506 Share on other sites More sharing options...
BlueSkyIS Posted November 21, 2010 Share Posted November 21, 2010 can you post the entire error message, including line number? Quote Link to comment https://forums.phpfreaks.com/topic/219365-fatal-error-call-to-undefined-function-in/#findComment-1137510 Share on other sites More sharing options...
Vivid Lust Posted November 21, 2010 Author Share Posted November 21, 2010 The entire message is in the this threads subject, minus the file name and the line is the line i posted at the top. Quote Link to comment https://forums.phpfreaks.com/topic/219365-fatal-error-call-to-undefined-function-in/#findComment-1137513 Share on other sites More sharing options...
sasa Posted November 21, 2010 Share Posted November 21, 2010 where you setup $message object? Quote Link to comment https://forums.phpfreaks.com/topic/219365-fatal-error-call-to-undefined-function-in/#findComment-1137516 Share on other sites More sharing options...
Vivid Lust Posted November 21, 2010 Author Share Posted November 21, 2010 require_once('classes/message.class.php'); $message = new message(); Quote Link to comment https://forums.phpfreaks.com/topic/219365-fatal-error-call-to-undefined-function-in/#findComment-1137518 Share on other sites More sharing options...
Vivid Lust Posted November 21, 2010 Author Share Posted November 21, 2010 Any Ideas? Quote Link to comment https://forums.phpfreaks.com/topic/219365-fatal-error-call-to-undefined-function-in/#findComment-1137576 Share on other sites More sharing options...
BlueSkyIS Posted November 21, 2010 Share Posted November 21, 2010 it would help if you would 1. post all relevant code so we can count lines to the error line and work backwards, and 2. post the complete error, including error line number. without more information we can only guess, which is a terrible way to debug. Quote Link to comment https://forums.phpfreaks.com/topic/219365-fatal-error-call-to-undefined-function-in/#findComment-1137654 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.