From 6e0d096d26881da17099e24e340b4c6db911dea3 Mon Sep 17 00:00:00 2001 From: Nick Sagona Date: Sat, 2 Sep 2023 23:15:42 -0500 Subject: [PATCH] Update dependencies --- composer.json | 6 +++--- src/Adapter/AbstractAdapter.php | 2 +- src/Adapter/AdapterInterface.php | 2 +- src/Adapter/Exception.php | 2 +- src/Adapter/File.php | 2 +- src/Adapter/Http.php | 9 +++++---- src/Adapter/Table.php | 2 +- src/Auditor.php | 2 +- src/Exception.php | 2 +- src/Model/AuditableInterface.php | 2 +- src/Model/AuditableModel.php | 2 +- 11 files changed, 17 insertions(+), 16 deletions(-) diff --git a/composer.json b/composer.json index e6177c8..67cd9e7 100644 --- a/composer.json +++ b/composer.json @@ -23,11 +23,11 @@ "require": { "php": ">=7.4.0", "popphp/popphp": "^3.7.2", - "popphp/pop-db": "^5.3.4", - "popphp/pop-http": "^4.1.6" + "popphp/pop-db": "^5.3.8", + "popphp/pop-http": "^4.2.0" }, "require-dev": { - "phpunit/phpunit": "^9.0.0" + "phpunit/phpunit": "^9.5.0" }, "autoload": { "psr-4": { diff --git a/src/Adapter/AbstractAdapter.php b/src/Adapter/AbstractAdapter.php index 197d435..90f7884 100644 --- a/src/Adapter/AbstractAdapter.php +++ b/src/Adapter/AbstractAdapter.php @@ -21,7 +21,7 @@ * @author Nick Sagona, III * @copyright Copyright (c) 2009-2023 NOLA Interactive, LLC. (http://www.nolainteractive.com) * @license http://www.popphp.org/license New BSD License - * @version 1.3.0 + * @version 1.3.2 */ abstract class AbstractAdapter implements AdapterInterface { diff --git a/src/Adapter/AdapterInterface.php b/src/Adapter/AdapterInterface.php index 6e9ea88..a0e09ff 100644 --- a/src/Adapter/AdapterInterface.php +++ b/src/Adapter/AdapterInterface.php @@ -21,7 +21,7 @@ * @author Nick Sagona, III * @copyright Copyright (c) 2009-2023 NOLA Interactive, LLC. (http://www.nolainteractive.com) * @license http://www.popphp.org/license New BSD License - * @version 1.3.0 + * @version 1.3.2 */ interface AdapterInterface { diff --git a/src/Adapter/Exception.php b/src/Adapter/Exception.php index daa7cf2..9d37e9a 100644 --- a/src/Adapter/Exception.php +++ b/src/Adapter/Exception.php @@ -21,6 +21,6 @@ * @author Nick Sagona, III * @copyright Copyright (c) 2009-2023 NOLA Interactive, LLC. (http://www.nolainteractive.com) * @license http://www.popphp.org/license New BSD License - * @version 1.3.0 + * @version 1.3.2 */ class Exception extends \Exception {} \ No newline at end of file diff --git a/src/Adapter/File.php b/src/Adapter/File.php index dacb386..a5e0696 100644 --- a/src/Adapter/File.php +++ b/src/Adapter/File.php @@ -21,7 +21,7 @@ * @author Nick Sagona, III * @copyright Copyright (c) 2009-2023 NOLA Interactive, LLC. (http://www.nolainteractive.com) * @license http://www.popphp.org/license New BSD License - * @version 1.3.0 + * @version 1.3.2 */ class File extends AbstractAdapter { diff --git a/src/Adapter/Http.php b/src/Adapter/Http.php index 4972a7e..88e1de0 100644 --- a/src/Adapter/Http.php +++ b/src/Adapter/Http.php @@ -23,7 +23,7 @@ * @author Nick Sagona, III * @copyright Copyright (c) 2009-2023 NOLA Interactive, LLC. (http://www.nolainteractive.com) * @license http://www.popphp.org/license New BSD License - * @version 1.3.0 + * @version 1.3.2 */ class Http extends AbstractAdapter { @@ -111,10 +111,11 @@ public function getFetchedResult() if (($this->fetchStream->hasResponse()) && ($this->fetchStream->getResponse()->hasBody())) { $resultResponse = $this->fetchStream->getResponse()->getBody()->getContent(); - if ($this->fetchStream->getResponse()->hasHeader('Content-Type')) { - if ($this->fetchStream->getResponse()->getHeader('Content-Type')->getValue() == 'application/json') { + if (($this->fetchStream->getResponse()->hasHeader('Content-Type')) && + (count($this->fetchStream->getResponse()->getHeader('Content-Type')->getValues()) == 1)) { + if ($this->fetchStream->getResponse()->getHeader('Content-Type')->getValue(0) == 'application/json') { $resultResponse = json_decode($resultResponse, true); - } else if ($this->fetchStream->getResponse()->getHeader('Content-Type')->getValue() == 'application/x-www-form-urlencoded') { + } else if ($this->fetchStream->getResponse()->getHeader('Content-Type')->getValue(0) == 'application/x-www-form-urlencoded') { parse_str($resultResponse, $resultResponse); } } diff --git a/src/Adapter/Table.php b/src/Adapter/Table.php index ba1be23..9ea880e 100644 --- a/src/Adapter/Table.php +++ b/src/Adapter/Table.php @@ -21,7 +21,7 @@ * @author Nick Sagona, III * @copyright Copyright (c) 2009-2023 NOLA Interactive, LLC. (http://www.nolainteractive.com) * @license http://www.popphp.org/license New BSD License - * @version 1.3.0 + * @version 1.3.2 */ class Table extends AbstractAdapter { diff --git a/src/Auditor.php b/src/Auditor.php index 1523f3f..3ce09fd 100644 --- a/src/Auditor.php +++ b/src/Auditor.php @@ -23,7 +23,7 @@ * @author Nick Sagona, III * @copyright Copyright (c) 2009-2023 NOLA Interactive, LLC. (http://www.nolainteractive.com) * @license http://www.popphp.org/license New BSD License - * @version 1.3.0 + * @version 1.3.2 */ class Auditor { diff --git a/src/Exception.php b/src/Exception.php index 4a79da4..a2b28f3 100644 --- a/src/Exception.php +++ b/src/Exception.php @@ -21,6 +21,6 @@ * @author Nick Sagona, III * @copyright Copyright (c) 2009-2023 NOLA Interactive, LLC. (http://www.nolainteractive.com) * @license http://www.popphp.org/license New BSD License - * @version 1.3.0 + * @version 1.3.2 */ class Exception extends \Exception {} \ No newline at end of file diff --git a/src/Model/AuditableInterface.php b/src/Model/AuditableInterface.php index 4d1951f..2194bea 100644 --- a/src/Model/AuditableInterface.php +++ b/src/Model/AuditableInterface.php @@ -23,7 +23,7 @@ * @author Nick Sagona, III * @copyright Copyright (c) 2009-2023 NOLA Interactive, LLC. (http://www.nolainteractive.com) * @license http://www.popphp.org/license New BSD License - * @version 1.3.0 + * @version 1.3.2 */ interface AuditableInterface { diff --git a/src/Model/AuditableModel.php b/src/Model/AuditableModel.php index f7cb800..f44a3b7 100644 --- a/src/Model/AuditableModel.php +++ b/src/Model/AuditableModel.php @@ -24,7 +24,7 @@ * @author Nick Sagona, III * @copyright Copyright (c) 2009-2023 NOLA Interactive, LLC. (http://www.nolainteractive.com) * @license http://www.popphp.org/license New BSD License - * @version 1.3.0 + * @version 1.3.2 */ abstract class AuditableModel extends AbstractModel implements AuditableInterface {