From a320895f19f6855e67a90ab1c021f5779240965f Mon Sep 17 00:00:00 2001 From: jingjingxyk Date: Sun, 12 Jan 2025 14:38:29 +0800 Subject: [PATCH] udate download-php-src-archive.php --- sapi/scripts/download-php-src-archive.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sapi/scripts/download-php-src-archive.php b/sapi/scripts/download-php-src-archive.php index 6383a6d41..fae0bf8ee 100644 --- a/sapi/scripts/download-php-src-archive.php +++ b/sapi/scripts/download-php-src-archive.php @@ -15,15 +15,15 @@ if (!file_exists($php_archive_file)) { `test -d {$download_dir} || mkdir -p {$download_dir}`; $download_php_counter++; - if ($download_php_counter > 3) { - throw new \Exception('curl download php archive Exception!', 500); - } `{$download_cmd}`; } $hash = hash_file('sha256', $php_archive_file); echo "sha256sum: " . $hash . PHP_EOL; if ($hash !== $php_archive_file_sha256sum) { + if ($download_php_counter > 3) { + throw new \Exception('curl download php archive Exception!', 500); + } echo 'archive sha256sum mismatched , will download ' . PHP_EOL; unlink($php_archive_file); goto DOWNLOAD_PHP;