File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -853,7 +853,7 @@ protected function db_update_validation()
853853 $ this ->basic_model ->where ($ primary_key ,$ state_info ->primary_key );
854854 $ row = $ this ->basic_model ->get_row ();
855855
856- if (!isset ($ row-> $ field_name )) {
856+ if (!property_exists ($ row, $ field_name )) {
857857 throw new Exception ("The field name doesn't exist in the database. " .
858858 "Please use the unique fields only for fields " .
859859 "that exist in the database " );
@@ -950,7 +950,7 @@ protected function db_insert($state_info)
950950 $ post_data [$ field ->field_name ] = array ();
951951 }
952952
953- if (isset ( $ post_data [ $ field ->field_name ] ) && !isset ($ this ->relation_n_n [$ field ->field_name ]))
953+ if (array_key_exists ( $ field ->field_name , $ post_data ) && !isset ($ this ->relation_n_n [$ field ->field_name ]))
954954 {
955955 if (isset ($ types [$ field ->field_name ]->db_null ) && $ types [$ field ->field_name ]->db_null && is_array ($ post_data [$ field ->field_name ]) && empty ($ post_data [$ field ->field_name ]))
956956 {
@@ -1075,7 +1075,7 @@ protected function db_update($state_info)
10751075 $ post_data [$ field ->field_name ] = array ();
10761076 }
10771077
1078- if (isset ( $ post_data [ $ field ->field_name ] ) && !isset ($ this ->relation_n_n [$ field ->field_name ]))
1078+ if (array_key_exists ( $ field ->field_name , $ post_data ) && !isset ($ this ->relation_n_n [$ field ->field_name ]))
10791079 {
10801080 if (isset ($ types [$ field ->field_name ]->db_null ) && $ types [$ field ->field_name ]->db_null && is_array ($ post_data [$ field ->field_name ]) && empty ($ post_data [$ field ->field_name ]))
10811081 {
You can’t perform that action at this time.
0 commit comments