Welcome Guest, Not a member yet? Register   Sign In
Baffling, sporadic error message - validation issue?
#4

[eluser]novice32[/eluser]
I intentionally set ClientID to empty string prior to the check to simulate the error (since HTML post passes only empty stings where null), yet I get the error message in the application ('ClientID is required') but I also get database error in my log file.

Shouldn't the below "return" exit the whole transaction and not continue to the AddItem method??? It had to continue onto the AddItem controller method and then onto AddItem model method to throw the database error.

Code:
$this->ClientID = "";
        if (empty($this->ClientID)) {
            echo json_encode(array('error'=>'ClientID is required'));
            return; //exit
        }


Messages In This Thread
Baffling, sporadic error message - validation issue? - by El Forum - 07-08-2010, 08:12 PM
Baffling, sporadic error message - validation issue? - by El Forum - 07-09-2010, 11:50 AM
Baffling, sporadic error message - validation issue? - by El Forum - 07-15-2010, 05:33 PM
Baffling, sporadic error message - validation issue? - by El Forum - 08-13-2010, 11:47 AM
Baffling, sporadic error message - validation issue? - by El Forum - 08-15-2010, 10:07 AM
Baffling, sporadic error message - validation issue? - by El Forum - 08-15-2010, 10:16 AM



Theme © iAndrew 2016 - Forum software by © MyBB