From ee4583e782d9bd04ff84aaffa203cf64fb4ba459 Mon Sep 17 00:00:00 2001 From: perfectio Date: Thu, 18 Jan 2018 04:46:55 +0300 Subject: [PATCH] Update phpQueryObject.php There was a problem with zero indexes means ->getString(0) is not working --- phpQuery/phpQuery/phpQueryObject.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpQuery/phpQuery/phpQueryObject.php b/phpQuery/phpQuery/phpQueryObject.php index 9693cb9..3eb3fc5 100644 --- a/phpQuery/phpQuery/phpQueryObject.php +++ b/phpQuery/phpQuery/phpQueryObject.php @@ -502,7 +502,7 @@ public function get($index = null, $callback1 = null, $callback2 = null, $callba * @todo maybe other name... */ public function getString($index = null, $callback1 = null, $callback2 = null, $callback3 = null) { - if ($index) + if ($index !== null) $return = $this->eq($index)->text(); else { $return = array(); @@ -529,7 +529,7 @@ public function getString($index = null, $callback1 = null, $callback2 = null, $ * @todo maybe other name... */ public function getStrings($index = null, $callback1 = null, $callback2 = null, $callback3 = null) { - if ($index) + if ($index !== null) $return = $this->eq($index)->text(); else { $return = array();