From 1b72140b466cff6936d62f9a3172f6c086f03653 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 5 Jan 2024 09:56:40 +0800 Subject: [PATCH] update samples --- .../petstore/php/OpenAPIClient-php/lib/Configuration.php | 6 +++--- samples/client/petstore/php/psr-18/lib/Configuration.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php index 2ee01e168a..97d1c64103 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php @@ -530,11 +530,11 @@ class Configuration } // check array index out of bound - if ($hostIndex < 0 || $hostIndex >= count($hostsSettings)) { - throw new \InvalidArgumentException("Invalid index $hostIndex when selecting the host. Must be less than ".count($hostsSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new \InvalidArgumentException("Invalid index $hostIndex when selecting the host. Must be less than ".count($hostSettings)); } - $host = $hostsSettings[$hostIndex]; + $host = $hostSettings[$hostIndex]; $url = $host["url"]; // go through variable and assign a value diff --git a/samples/client/petstore/php/psr-18/lib/Configuration.php b/samples/client/petstore/php/psr-18/lib/Configuration.php index 2ee01e168a..97d1c64103 100644 --- a/samples/client/petstore/php/psr-18/lib/Configuration.php +++ b/samples/client/petstore/php/psr-18/lib/Configuration.php @@ -530,11 +530,11 @@ class Configuration } // check array index out of bound - if ($hostIndex < 0 || $hostIndex >= count($hostsSettings)) { - throw new \InvalidArgumentException("Invalid index $hostIndex when selecting the host. Must be less than ".count($hostsSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new \InvalidArgumentException("Invalid index $hostIndex when selecting the host. Must be less than ".count($hostSettings)); } - $host = $hostsSettings[$hostIndex]; + $host = $hostSettings[$hostIndex]; $url = $host["url"]; // go through variable and assign a value