potential fix for active is required
All checks were successful
Build and push / Pulling repo on server (push) Successful in 3s

This commit is contained in:
2023-10-30 22:36:18 +01:00
parent 242cf9583e
commit 604b0fbb74
3 changed files with 13 additions and 11 deletions

View File

@ -95,8 +95,10 @@ class Model {
* @param $value The value to search for
* @param string $field The field to search in. HAS to be marked as unique otherwise will throw error
*/
public function load($value,$field='id')
public function load($value=false,$field='id')
{
if(!$value)
$value = $this->id;
if($field!='id')
{
//sanity check. Check if $field is marked as unique