Skip to content

Commit

Permalink
fix notice
Browse files Browse the repository at this point in the history
  • Loading branch information
mrsmoking committed Jun 22, 2021
1 parent 56c8446 commit 403beee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ActiveRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ function activerecord_autoload($class_name)
foreach ($namespaces as $directory)
$directories[] = $directory;

$root .= DIRECTORY_SEPARATOR . implode($directories, DIRECTORY_SEPARATOR);
$root .= DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, $directories);
}

$file = "$root/$class_name.php";

if (file_exists($file))
require_once $file;
}
}
2 changes: 1 addition & 1 deletion lib/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ public function query_and_fetch_one($sql, &$values=array())
{
$sth = $this->query($sql, $values);
$row = $sth->fetch(PDO::FETCH_NUM);
return $row[0];
return $row ? $row[0] : false;
}

/**
Expand Down

0 comments on commit 403beee

Please sign in to comment.