Skip to content

Commit b227de7

Browse files
authored
Merge pull request #1 from bakaphp/hotfix-custom-returntype
Hotfix custom returntype
2 parents a48c77b + 698e30a commit b227de7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Model.php

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
namespace Baka\Database;
44

5-
use Phalcon\Mvc\Model\ResultsetInterface;
6-
75
class Model extends \Phalcon\Mvc\Model
86
{
97
/**

src/ModelCustomFields.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ class ModelCustomFields extends Model
2424
*/
2525
public static function getCustomFields($findResults, $getById = false)
2626
{
27-
if (count($findResults) == 1 && $getById) {
28-
$findResults = [$findResults];
27+
if (is_array($findResults)) {
28+
if (count($findResults) == 1 && $getById) {
29+
$findResults = [$findResults];
30+
}
2931
}
3032

3133
$results = [];

0 commit comments

Comments
 (0)