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
Summary: www/phpvirtualbox[-legacy]: Fails to run with PHP 8: PHP Warning: Undefined a...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Vladimir Druzenko
URL: https://github.com/phpvirtualbox/phpv...
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2022-01-26 18:08 UTC by Ivan Rozhuk
Modified: 2023-09-18 12:47 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (vbox)
koobs: merge-quarterly?


Attachments
workaround (1.52 KB, patch)
2022-01-26 18:20 UTC, Ivan Rozhuk
no flags Details | Diff
patch (1.53 KB, patch)
2022-01-31 10:57 UTC, Ivan Rozhuk
no flags Details | Diff
patch (1.83 KB, patch)
2022-02-10 14:51 UTC, Ivan Rozhuk
no flags Details | Diff
www/phpvirtualbox: php8 support (6.69 KB, patch)
2023-05-16 12:44 UTC, Vladimir Druzenko
no flags Details | Diff
www/phpvirtualbox-legacy: php8 support (6.75 KB, patch)
2023-05-16 12:45 UTC, Vladimir Druzenko
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Rozhuk 2022-01-26 18:08:11 UTC
PHP message: PHP Warning: Undefined array key "context" in /usr/local/www/phpvirtualbox/endpoints/lib/language.php on line 77
Comment 1 Ivan Rozhuk 2022-01-26 18:20:56 UTC
Created attachment 231363 [details]
workaround
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2022-01-26 22:25:43 UTC
Is the patch obtained from an existing externa/third party source? If so, please include references
Comment 3 Ivan Rozhuk 2022-01-26 22:32:32 UTC
(In reply to Kubilay Kocak from comment #2)

This is mine quick workaround, have no idea how to proper fix it, but without this code block it continue work.

Probably it was broken and php7 ignore errors and continue execute.
Comment 4 Ivan Rozhuk 2022-01-31 10:57:52 UTC
Created attachment 231467 [details]
patch
Comment 5 Ivan Rozhuk 2022-02-10 14:51:36 UTC
Created attachment 231712 [details]
patch

Add patch for media selection dialog.
Comment 6 Vladimir Druzenko freebsd_committer freebsd_triage 2022-06-15 18:19:14 UTC
Add please patches from my set too:
https://github.com/phpvirtualbox/phpvirtualbox/issues/306
Comment 7 Vladimir Druzenko freebsd_committer freebsd_triage 2022-06-15 18:20:03 UTC
For both - www/phpvirtualbox and www/phpvirtualbox-legacy.
Comment 8 Vladimir Druzenko freebsd_committer freebsd_triage 2023-05-16 12:44:27 UTC
Created attachment 242211 [details]
www/phpvirtualbox: php8 support

(In reply to Ivan Rozhuk from comment #5)
Both patches:
> This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

IMHO, better add patch to the port.
Comment 9 Vladimir Druzenko freebsd_committer freebsd_triage 2023-05-16 12:45:10 UTC
Created attachment 242212 [details]
www/phpvirtualbox-legacy: php8 support

Same patch for www/phpvirtualbox-legacy.
Comment 11 commit-hook freebsd_committer freebsd_triage 2023-05-21 15:35:09 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e134016b3d5eb6d1f8b741ccf1516151a6c23189

commit e134016b3d5eb6d1f8b741ccf1516151a6c23189
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2023-05-21 15:32:48 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2023-05-21 15:32:48 +0000

    www/phpvirtualbox: PHP 8 support

    Patched from different sources

    PR:                     261498
    Approved by:            arrowd (mentor)
    Differential Revision:  https://reviews.freebsd.org/D40115

 www/phpvirtualbox/Makefile               |   1 +
 www/phpvirtualbox/files/patch-php8 (new) | 187 +++++++++++++++++++++++++++++++
 2 files changed, 188 insertions(+)
Comment 12 commit-hook freebsd_committer freebsd_triage 2023-05-22 09:53:28 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f3629be7b94fdc12e18b85c127ffdcfe894c7c07

commit f3629be7b94fdc12e18b85c127ffdcfe894c7c07
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2023-05-22 09:52:20 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2023-05-22 09:52:20 +0000

    www/phpvirtualbox-legacy: PHP 8 support

    Patched from different sources

    PR:                     261498
    Approved by:            arrowd (mentor)
    Differential Revision:  https://reviews.freebsd.org/D40116

 www/phpvirtualbox-legacy/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Comment 13 commit-hook freebsd_committer freebsd_triage 2023-05-22 10:01:30 UTC
A commit in branch 2023Q2 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c94e0944b7f5e3c189673a25be75db3322bf0f72

commit c94e0944b7f5e3c189673a25be75db3322bf0f72
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2023-05-22 09:52:20 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2023-05-22 10:00:46 +0000

    www/phpvirtualbox-legacy: PHP 8 support

    Patched from different sources

    PR:                     261498
    Approved by:            arrowd (mentor)
    Differential Revision:  https://reviews.freebsd.org/D40116

    (cherry picked from commit f3629be7b94fdc12e18b85c127ffdcfe894c7c07)

 www/phpvirtualbox-legacy/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Comment 14 commit-hook freebsd_committer freebsd_triage 2023-05-22 10:01:31 UTC
A commit in branch 2023Q2 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=df45388d37d5a156a503c51bffd051ed314cf3ef

commit df45388d37d5a156a503c51bffd051ed314cf3ef
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2023-05-21 15:32:48 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
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 (new) | 187 +++++++++++++++++++++++++++++++
 2 files changed, 188 insertions(+)
Comment 15 commit-hook freebsd_committer freebsd_triage 2023-09-18 12:41:44 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3f1b38acfda124fc8f03fe5f4edfef10ef214501

commit 3f1b38acfda124fc8f03fe5f4edfef10ef214501
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2023-09-18 12:35:49 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2023-09-18 12:39:54 +0000

    www/phpvirtualbox{,-legacy}: PHP 8 support (1 more catch) - "preg_replace"

    Fixed:
    PHP Warning: preg_replace() expects at least 3 parameters, 2 given in endpoints/screen.php on line 91

    PR:             261498
    Approved by:    tcberner (mentor)
    MFH:            2023Q3

 www/phpvirtualbox-legacy/Makefile  |  2 +-
 www/phpvirtualbox/Makefile         |  2 +-
 www/phpvirtualbox/files/patch-php8 | 28 +++++++++++++++++++++++++---
 3 files changed, 27 insertions(+), 5 deletions(-)
Comment 16 commit-hook freebsd_committer freebsd_triage 2023-09-18 12:47:47 UTC
A commit in branch 2023Q3 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fc4ebc143c4b097ec1ea90fa6831a3125c8619de

commit fc4ebc143c4b097ec1ea90fa6831a3125c8619de
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2023-09-18 12:35:49 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2023-09-18 12:47:04 +0000

    www/phpvirtualbox{,-legacy}: PHP 8 support (1 more catch) - "preg_replace"

    Fixed:
    PHP Warning: preg_replace() expects at least 3 parameters, 2 given in endpoints/screen.php on line 91

    PR:             261498
    Approved by:    tcberner (mentor)
    MFH:            2023Q3

    (cherry picked from commit 3f1b38acfda124fc8f03fe5f4edfef10ef214501)

 www/phpvirtualbox-legacy/Makefile  |  2 +-
 www/phpvirtualbox/Makefile         |  2 +-
 www/phpvirtualbox/files/patch-php8 | 28 +++++++++++++++++++++++++---
 3 files changed, 27 insertions(+), 5 deletions(-)