FreeBSD Bugzilla – Attachment 231363 Details for
Bug 261498
www/phpvirtualbox[-legacy]: Fails to run with PHP 8: PHP Warning: Undefined array key "context" in /usr/local/www/phpvirtualbox/endpoints/lib/language.php on line 77
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
workaround
9d0fa91181.patch (text/plain), 1.52 KB, created by
Ivan Rozhuk
on 2022-01-26 18:20:56 UTC
(
hide
)
Description:
workaround
Filename:
MIME Type:
Creator:
Ivan Rozhuk
Created:
2022-01-26 18:20:56 UTC
Size:
1.52 KB
patch
obsolete
>From 9d0fa911813aa36ae0bec3eb192e019ad9b5d03b Mon Sep 17 00:00:00 2001 >From: Rozhuk Ivan <rozhuk.im@gmail.com> >Date: Wed, 26 Jan 2022 21:09:13 +0300 >Subject: [PATCH] www/phpvirtualbox: quick workaround for PHP8 > >--- > .../files/patch-endpoints_lib_language.php | 27 +++++++++++++++++++ > 1 file changed, 27 insertions(+) > create mode 100644 www/phpvirtualbox/files/patch-endpoints_lib_language.php > >diff --git a/www/phpvirtualbox/files/patch-endpoints_lib_language.php b/www/phpvirtualbox/files/patch-endpoints_lib_language.php >new file mode 100644 >index 000000000000..241f6b3f3f03 >--- /dev/null >+++ b/www/phpvirtualbox/files/patch-endpoints_lib_language.php >@@ -0,0 +1,27 @@ >+--- endpoints/lib/language.php 2022-01-26 21:01:27.772959000 +0300 >++++ endpoints/lib/language.php 2022-01-26 21:03:08.996051000 +0300 >+@@ -74,24 +74,7 @@ >+ $arrXml = $this->objectsIntoArray($xmlObj); >+ >+ $lang = array(); >+- if(!@$arrXml['context'][0]) $arrXml['context'] = array($arrXml['context']); >+- foreach($arrXml['context'] as $c) { >+ >+- if(!is_array($c) || !@$c['name']) continue; >+- if(!@$c['message'][0]) $c['message'] = array($c['message']); >+- >+- $lang['contexts'][$c['name']] = array(); >+- $lang['contexts'][$c['name']]['messages'] = array(); >+- >+- foreach($c['message'] as $m) { >+- >+- if(!is_array($m)) continue; >+- >+- $s = $m['source']; >+- unset($m['source']); >+- $lang['contexts'][$c['name']]['messages'][$s] = $m; >+- } >+- } >+ self::$langdata = array_merge_recursive(self::$langdata, $lang); >+ } >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 261498
:
231363
|
231467
|
231712
|
242211
|
242212