From nobody Mon May 22 10:00:53 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QPtHn440mz4TK2W; Mon, 22 May 2023 10:00:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QPtHn3YMmz4J8X; Mon, 22 May 2023 10:00:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684749653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YyT/GdZur38tSwti+CsxR5yRVmrZe6unx6HS7+Rlurk=; b=sC57rj+IRR21k/tLmyZDh5ZAYxTF0OxRYS89a+MmsedyvmBrPKF7bOR3gRfifNcydNnvCF 1erxwngpwfsoKOs6SuVpOMiUcFtpTVRrmbNltFoEjIukJ6zlVWZC7zaeq9wJ5FxuBLAEBW e150jEv8t9gvHaNzU6DVs6i60mB6HGguW36GY895p+vOJ9+3HTrv1UqISIjjNnok8/Cw4z V2gBogzRUS1ngwPqOiR8dT4MvG5WaJdCabGtGR/5/qAOb7t6Tjh6W61nfXwAjKst+LoTOB +g3WN6HQCHlctM1JrBefMIt+lgixWzbZGde39uQe7ZlYlyr+fx24hfFlw4FEHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684749653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YyT/GdZur38tSwti+CsxR5yRVmrZe6unx6HS7+Rlurk=; b=g5bh64PjD0ld6Di8vuD5xc0kmgj0xT/cpXnGK0hKX2T2ouysmW3wG5PFRV16IX9P8IhFsV 25zXMNlFaB1HW1uIy1zYNRi7JmEHvyR/4WEPp/nErQDyfcXAybQADpa+E0Ye74TgNr0Rwb BL2st3spsg3m0C9caSx0ibUzt+jwy+C7QpSIaPn6orjR+eNbQjk8gbldW6pcGUeOoiNEvz T6qeiN/UeEmSbY85PXrPVWatciAmLwKiwAT0ktIyNNy5t8+FqkTGfv10FB+BTZBoXHKq1G GYtbvSqoiwvikOuCndRqEvlXKU165ugHqKlJ/KTGYYU3TI8rwo8jTjzaHDP8/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1684749653; a=rsa-sha256; cv=none; b=LtH7WjP7k4HBDyB+V2b1gone4+WFpcmWgy+DZKONYrLD91WQMOAiVKBxcGurZjQLqzqH+P 8NvVd5M9lg0Mq60GwL2t3Npwja3cuD8kMLgdQ62ELjPpGL50RhYcciTUhC66d+6C4fWLQt iMOUGqyh2uQibWXQkzKnYjMEdRbnyjWECZ5bXH8lGV3U+72pb6BZN9ENDzjVbhhb3JJ/kd /lpyeKOIcH5hyve+CToFactEMWnNYXVnRUIaerJ2ujRN8OFLs+KZGgappI3tduhimvSR9H yzBAqbVj9ekPHBiG1SeODQUe8fPYYHIu2olv4ARfkYfZ2gObAJkydeXDqgXMqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QPtHn2dzWz1SHv; Mon, 22 May 2023 10:00:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 34MA0rHk008565; Mon, 22 May 2023 10:00:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34MA0rBH008564; Mon, 22 May 2023 10:00:53 GMT (envelope-from git) Date: Mon, 22 May 2023 10:00:53 GMT Message-Id: <202305221000.34MA0rBH008564@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Vladimir Druzenko Subject: git: df45388d37d5 - 2023Q2 - www/phpvirtualbox: PHP 8 support List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vvd X-Git-Repository: ports X-Git-Refname: refs/heads/2023Q2 X-Git-Reftype: branch X-Git-Commit: df45388d37d5a156a503c51bffd051ed314cf3ef Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch 2023Q2 has been updated by vvd: URL: https://cgit.FreeBSD.org/ports/commit/?id=df45388d37d5a156a503c51bffd051ed314cf3ef commit df45388d37d5a156a503c51bffd051ed314cf3ef Author: Vladimir Druzenko AuthorDate: 2023-05-21 15:32:48 +0000 Commit: Vladimir Druzenko CommitDate: 2023-05-22 10:00:37 +0000 www/phpvirtualbox: PHP 8 support Patched from different sources PR: 261498 Approved by: arrowd (mentor) Differential Revision: https://reviews.freebsd.org/D40115 (cherry picked from commit e134016b3d5eb6d1f8b741ccf1516151a6c23189) --- www/phpvirtualbox/Makefile | 1 + www/phpvirtualbox/files/patch-php8 | 187 +++++++++++++++++++++++++++++++++++++ 2 files changed, 188 insertions(+) diff --git a/www/phpvirtualbox/Makefile b/www/phpvirtualbox/Makefile index 6340cce6dc9e..aac68606b5aa 100644 --- a/www/phpvirtualbox/Makefile +++ b/www/phpvirtualbox/Makefile @@ -1,5 +1,6 @@ PORTNAME= phpvirtualbox DISTVERSION= 6.1 +PORTREVISION= 1 CATEGORIES= www MAINTAINER= vbox@FreeBSD.org diff --git a/www/phpvirtualbox/files/patch-php8 b/www/phpvirtualbox/files/patch-php8 new file mode 100644 index 000000000000..d6566684b8ca --- /dev/null +++ b/www/phpvirtualbox/files/patch-php8 @@ -0,0 +1,187 @@ +diff -ur endpoints/api.php.orig endpoints/api.php +--- endpoints/api.php.orig ++++ endpoints/api.php +@@ -334,6 +334,9 @@ + + // Just append to $vbox->errors and let it get + // taken care of below ++ if(!isset($vbox)) { ++ $vbox = new stdClass(); ++ } + if(!$vbox || !$vbox->errors) { + $vbox->errors = array(); + } +@@ -342,7 +345,7 @@ + + + // Add any messages +-if($vbox && count($vbox->messages)) { ++if($vbox && isset($vbox->messages)?count($vbox->messages):false) { + foreach($vbox->messages as $m) + $response['messages'][] = 'vboxconnector('.$request['fn'] .'): ' . $m; + } +@@ -360,7 +363,7 @@ + if($e->getCode() == vboxconnector::PHPVB_ERRNO_CONNECT && isset($vbox->settings)) + $d .= "\n\nLocation:" . $vbox->settings->location; + +- $response['messages'][] = htmlentities($e->getMessage()).' ' . htmlentities($details); ++ $response['messages'][] = htmlentities($e->getMessage()). htmlentities(' '. $details); + + $response['errors'][] = array( + 'error'=> ($e->getCode() & vboxconnector::PHPVB_ERRNO_HTML ? $e->getMessage() : htmlentities($e->getMessage())), +diff -ur endpoints/jqueryFileTree.php.orig endpoints/jqueryFileTree.php +--- endpoints/jqueryFileTree.php.orig ++++ endpoints/jqueryFileTree.php +@@ -223,6 +223,8 @@ + */ + function getdir($dir, $dirsOnly=false, $recurse=array()) { + ++ global $allowed_exts; ++ + if(!$dir) $dir = DSEP; + + $entries = getDirEntries($dir, $dirsOnly); +@@ -251,9 +253,9 @@ + // Push file on to stack + } else { + +- $ext = strtolower(preg_replace('/^.*\./', '', $file)); ++ $ext = strtolower(preg_replace('/^.*\./', '', $path)); + +- if(count($allowed) && !$allowed['.'.$ext]) continue; ++ if(count($allowed_exts) && !$allowed_exts['.'.$ext]) continue; + + array_push($dirents, file_entry($path)); + } +diff -ur endpoints/lib/language.php.orig endpoints/lib/language.php +--- endpoints/lib/language.php.orig ++++ endpoints/lib/language.php +@@ -73,6 +73,8 @@ + $xmlObj = simplexml_load_string(@file_get_contents(VBOX_BASE_LANG_DIR.'/'.$lang.'.xml')); + $arrXml = $this->objectsIntoArray($xmlObj); + ++ if(!array_key_exists('context',$arrXml)) return; ++ + $lang = array(); + if(!@$arrXml['context'][0]) $arrXml['context'] = array($arrXml['context']); + foreach($arrXml['context'] as $c) { +diff -ur endpoints/lib/vboxServiceWrappers.php.orig endpoints/lib/vboxServiceWrappers.php +--- endpoints/lib/vboxServiceWrappers.php.orig ++++ endpoints/lib/vboxServiceWrappers.php +@@ -108,7 +108,7 @@ + } + + /** ArrayAccess Functions **/ +- public function offsetSet($offset, $value) ++ public function offsetSet($offset, $value): void + { + if ($value instanceof $this->_interfaceName) + { +@@ -127,49 +127,50 @@ + } + } + +- public function offsetExists($offset) ++ public function offsetExists($offset): bool + { + return isset($this->_objects[$offset]); + } + +- public function offsetUnset($offset) ++ public function offsetUnset($offset): void + { + unset($this->_objects[$offset]); + } + +- public function offsetGet($offset) ++ public function offsetGet($offset): mixed + { + return isset($this->_objects[$offset]) ? $this->_objects[$offset] : null; + } + + /** Iterator Functions **/ +- public function rewind() ++ public function rewind(): void + { + reset($this->_objects); + } + +- public function current() ++ public function current(): mixed + { + return current($this->_objects); + } + +- public function key() ++ public function key(): mixed + { + return key($this->_objects); + } + ++ #[\ReturnTypeWillChange] + public function next() + { + return next($this->_objects); + } + +- public function valid() ++ public function valid(): bool + { + return ($this->current() !== false); + } + + /** Countable Functions **/ +- public function count() ++ public function count(): int + { + return count($this->_objects); + } +diff -ur endpoints/screen.php.orig endpoints/screen.php +--- endpoints/screen.php.orig ++++ endpoints/screen.php +@@ -87,13 +87,13 @@ + + // Let the browser cache images for 3 seconds + $ctime = 0; +- if(strpos($_SERVER['HTTP_IF_NONE_MATCH'],'_')) { ++ if(strpos($_SERVER['HTTP_IF_NONE_MATCH'] ?? '','_')) { + $ctime = preg_replace("/.*_/",str_replace('"','',$_SERVER['HTTP_IF_NONE_MATCH'])); +- } else if(strpos($_ENV['HTTP_IF_NONE_MATCH'],'_')) { ++ } else if(strpos($_ENV['HTTP_IF_NONE_MATCH'] ?? '','_')) { + $ctime = preg_replace("/.*_/",str_replace('"','',$_ENV['HTTP_IF_NONE_MATCH'])); +- } else if(strpos($_SERVER['HTTP_IF_MODIFIED_SINCE'],'GMT')) { ++ } else if(strpos($_SERVER['HTTP_IF_MODIFIED_SINCE'] ?? '','GMT')) { + $ctime = strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']); +- } else if(strpos($_ENV['HTTP_IF_MODIFIED_SINCE'],'GMT')) { ++ } else if(strpos($_ENV['HTTP_IF_MODIFIED_SINCE'] ?? '','GMT')) { + $ctime = strtotime($_ENV['HTTP_IF_MODIFIED_SINCE']); + } + +diff -ur panes/settingsDisplay.html.orig panes/settingsDisplay.html +--- panes/settingsDisplay.html.orig ++++ panes/settingsDisplay.html +@@ -77,9 +77,9 @@ + Authentication Method: + + + + +diff -ur panes/settingsNetwork.html.orig panes/settingsNetwork.html +--- panes/settingsNetwork.html.orig ++++ panes/settingsNetwork.html +@@ -320,7 +320,7 @@ + } + + // Special case for Internal, Generic, and VDE network selects +- if(sel.value == 'Internal' || sel.value == 'VDE' || sel.value == 'Generic' || sel.value == 'Bridged') { ++ if(sel.value == 'Internal' || sel.value == 'VDE' || sel.value == 'Generic') { + $(nsel).jec(); + } +