update samples

This commit is contained in:
William Cheng
2024-01-05 09:56:40 +08:00
parent 3d91fa8bd7
commit 1b72140b46
2 changed files with 6 additions and 6 deletions

View File

@@ -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

View File

@@ -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