Fix the infinite loop for a wrong strpos result evaluation. in Users model class.
This commit is contained in:
@@ -104,11 +104,17 @@ class Users extends BaseUsers
|
|||||||
}
|
}
|
||||||
//capture invalid birthday date and replace by null
|
//capture invalid birthday date and replace by null
|
||||||
$msg = $e->getMessage();
|
$msg = $e->getMessage();
|
||||||
if (strpos( 'Unable to parse value of [usr_birthday]', $msg ) != - 1) {
|
if (strpos( 'Unable to parse value of [usr_birthday]', $msg ) !== false) {
|
||||||
$oRow->setUsrBirthday( null );
|
$oRow->setUsrBirthday( null );
|
||||||
$oRow->save();
|
$oRow->save();
|
||||||
return $this->load( $UsrUid );
|
return $this->load( $UsrUid );
|
||||||
}
|
}
|
||||||
|
//capture invalid create date and replace by null
|
||||||
|
if (strpos( 'Unable to parse value of [usr_create_date]', $msg ) !== false) {
|
||||||
|
$oRow->setUsrCreateDate( null );
|
||||||
|
$oRow->save();
|
||||||
|
return $this->load( $UsrUid );
|
||||||
|
}
|
||||||
} catch (Exception $oError) {
|
} catch (Exception $oError) {
|
||||||
throw ($oError);
|
throw ($oError);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user