@@ -174,7 +174,7 @@ public function getCustomResultObject(string $className)
174174 */
175175 public function getResultArray (): array
176176 {
177- if (! empty ( $ this ->resultArray ) ) {
177+ if ($ this ->resultArray !== [] ) {
178178 return $ this ->resultArray ;
179179 }
180180
@@ -214,7 +214,7 @@ public function getResultArray(): array
214214 */
215215 public function getResultObject (): array
216216 {
217- if (! empty ( $ this ->resultObject ) ) {
217+ if ($ this ->resultObject !== [] ) {
218218 return $ this ->resultObject ;
219219 }
220220
@@ -323,7 +323,7 @@ public function getCustomRowObject(int $n, string $className)
323323 public function getRowArray (int $ n = 0 )
324324 {
325325 $ result = $ this ->getResultArray ();
326- if (empty ( $ result) ) {
326+ if ($ result === [] ) {
327327 return null ;
328328 }
329329
@@ -344,7 +344,7 @@ public function getRowArray(int $n = 0)
344344 public function getRowObject (int $ n = 0 )
345345 {
346346 $ result = $ this ->getResultObject ();
347- if (empty ( $ result) ) {
347+ if ($ result === [] ) {
348348 return null ;
349349 }
350350
@@ -392,7 +392,7 @@ public function getFirstRow(string $type = 'object')
392392 {
393393 $ result = $ this ->getResult ($ type );
394394
395- return (empty ( $ result) ) ? null : $ result [0 ];
395+ return ($ result === [] ) ? null : $ result [0 ];
396396 }
397397
398398 /**
@@ -404,7 +404,7 @@ public function getLastRow(string $type = 'object')
404404 {
405405 $ result = $ this ->getResult ($ type );
406406
407- return (empty ( $ result) ) ? null : $ result [count ($ result ) - 1 ];
407+ return ($ result === [] ) ? null : $ result [count ($ result ) - 1 ];
408408 }
409409
410410 /**
@@ -415,7 +415,7 @@ public function getLastRow(string $type = 'object')
415415 public function getNextRow (string $ type = 'object ' )
416416 {
417417 $ result = $ this ->getResult ($ type );
418- if (empty ( $ result) ) {
418+ if ($ result === [] ) {
419419 return null ;
420420 }
421421
@@ -430,7 +430,7 @@ public function getNextRow(string $type = 'object')
430430 public function getPreviousRow (string $ type = 'object ' )
431431 {
432432 $ result = $ this ->getResult ($ type );
433- if (empty ( $ result) ) {
433+ if ($ result === [] ) {
434434 return null ;
435435 }
436436
0 commit comments