save() returning false, but with no error in CakePHP

前端 未结 8 1842
一生所求
一生所求 2020-12-15 02:52

My debug value is set to 2, and it\'s displaying all the queries, except the one I need.

I have an Items controller method that is calling

8条回答
  •  甜味超标
    2020-12-15 03:26

    CakePHP 3.6

    $entity = $this->Model->newEntity([
        'account_id' => $id,
        'gallery_id' => $gallery_id
    ]);
    
    $result = $this->Model->save($entity);
    
    print_r($entity->getErrors());
    

提交回复
热议问题