This is an automated email from the ASF dual-hosted git repository.

jfthomps pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/vcl.git

commit 4e7f20e1d4f08c4bdd7686bc0a212ec356c723c3
Author: Josh Thompson <jftho...@ncsu.edu>
AuthorDate: Thu Feb 15 16:36:16 2024 -0500

    VCL-1138 - make PHP code compatible with PHP 8
    
    image.php: modified validateResourceData: check that cpuspeed and reload 
are < 1 instead of < 0
---
 web/.ht-inc/image.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/web/.ht-inc/image.php b/web/.ht-inc/image.php
index 38c3932a..4cc93058 100644
--- a/web/.ht-inc/image.php
+++ b/web/.ht-inc/image.php
@@ -1711,7 +1711,7 @@ class Image extends Resource {
                        $return['error'] = 1;
                        $errormsg[] = i("Cores must be between 0 and 255");
                }
-               if($return["cpuspeed"] < 0 || $return["cpuspeed"] > 20000) {
+               if($return["cpuspeed"] < 1 || $return["cpuspeed"] > 20000) {
                        $return['error'] = 1;
                        $errormsg[] = i("Processor Speed must be between 0 and 
20000");
                }
@@ -1726,7 +1726,7 @@ class Image extends Resource {
                        $errormsg[] = i("Max concurrent usage must be between 0 
and 255");
                }
                if($return['mode'] == 'edit' && 
-                  ($return["reload"] < 0 || $return["reload"] > 120)) {
+                  ($return["reload"] < 1 || $return["reload"] > 120)) {
                        $return['error'] = 1;
                        $errormsg[] = i("Estimated Reload Time must be between 
0 and 120");
                }

Reply via email to