Skip to content

Commit 85fd225

Browse files
committed
'exists' method refactored
1 parent 8580ba8 commit 85fd225

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Jsonq.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,11 @@ public function fetch($object = true)
125125
*/
126126
public function exists()
127127
{
128-
return count($this->_map) > 0;
128+
if (!empty($this->_map) && !is_null($this->_map)) {
129+
return true;
130+
}
131+
132+
return false;
129133
}
130134

131135

0 commit comments

Comments
 (0)