Skip to content

Commit

Permalink
Merge pull request #3 from ZsharE/master
Browse files Browse the repository at this point in the history
Change chrunchResource update() function to accept null values
  • Loading branch information
cybrox authored Apr 8, 2018
2 parents 43773e7 + 5d1f43b commit 5b6d0c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/crunchResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public function delete(){
public function update(){
foreach($this->data as $data){
foreach(func_get_args() as $arg){
if($this->base->tbdata['data'][$data['__dbid']][$arg[0]] != null){
if(array_key_exists($arg['0'], $this->base->tbdata['data'][$data['__dbid']])) {
$this->base->tbdata['data'][$data['__dbid']][$arg[0]] = $arg[1];
}
}
Expand Down Expand Up @@ -219,4 +219,4 @@ private function _cmp() {

}

?>
?>

0 comments on commit 5b6d0c1

Please sign in to comment.