diff options
author | dsiddhath2 <dsiddhath2@gmail.com> | 2017-12-25 10:06:38 +0530 |
---|---|---|
committer | dsiddhath2 <dsiddhath2@gmail.com> | 2017-12-25 10:06:38 +0530 |
commit | 19c513109c0a5f5c78c54a4fada3b1c1ecbabf8e (patch) | |
tree | dd1024b2e1d0508a6b18e94f4497db7d836abfd7 /src | |
parent | 69f7e675bc717cbf21b726799745fd479a6cf82f (diff) | |
download | php-zxing-19c513109c0a5f5c78c54a4fada3b1c1ecbabf8e.zip php-zxing-19c513109c0a5f5c78c54a4fada3b1c1ecbabf8e.tar.gz php-zxing-19c513109c0a5f5c78c54a4fada3b1c1ecbabf8e.tar.bz2 |
Fixed the Counting of non-countable objects by removing the count in the code1.0.0
Diffstat (limited to 'src')
-rw-r--r-- | src/PHPZxing/PHPZxingDecoder.php | 4 | ||||
-rw-r--r-- | src/examples/example.php | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/PHPZxing/PHPZxingDecoder.php b/src/PHPZxing/PHPZxingDecoder.php index 1985008..7ab7804 100644 --- a/src/PHPZxing/PHPZxingDecoder.php +++ b/src/PHPZxing/PHPZxingDecoder.php @@ -183,7 +183,7 @@ class PHPZxingDecoder extends PHPZxingBase { * Function that creates a command using the options provided */ public function prepare() { - if($this->_ARRAY_IMAGES != null || count($this->_ARRAY_IMAGES) > 0) { + if(is_array($this->_ARRAY_IMAGES)) { return $this->prepareImageArray(); } else { return $this->prepareSingleImage(); @@ -208,7 +208,7 @@ class PHPZxingDecoder extends PHPZxingBase { if(is_array($image)) { $this->setArrayImages($image); - if($this->_ARRAY_IMAGES == null || count($this->_ARRAY_IMAGES) <= 0) { + if($this->_ARRAY_IMAGES == null) { throw new \Exception("Nothing to decode"); } diff --git a/src/examples/example.php b/src/examples/example.php index ea3d4c6..5c979cb 100644 --- a/src/examples/example.php +++ b/src/examples/example.php @@ -1,4 +1,7 @@ <?php + error_reporting(E_ALL); + ini_set('display_errors', 1); + require dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . "PHPZxing" . DIRECTORY_SEPARATOR . "PHPZxingBase.php"; require dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . "PHPZxing" . DIRECTORY_SEPARATOR . "PHPZxingDecoder.php"; require dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . "PHPZxing" . DIRECTORY_SEPARATOR . "ZxingImage.php"; |