Bug 1402833 - php-pear-HTML-QuickForm doesn't work with PHP 7
Summary: php-pear-HTML-QuickForm doesn't work with PHP 7
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: php-pear-HTML-QuickForm
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Remi Collet
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-08 12:42 UTC by Jonathan Dieter
Modified: 2016-12-16 20:59 UTC (History)
1 user (show)

Fixed In Version: php-pear-HTML-QuickForm-3.2.14-4.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-16 20:59:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Fixes PHP 7 compatibility (26.39 KB, patch)
2016-12-08 12:42 UTC, Jonathan Dieter
no flags Details | Diff

Description Jonathan Dieter 2016-12-08 12:42:20 UTC
Created attachment 1229458 [details]
Fixes PHP 7 compatibility

Description of problem:
HTML_QuickForm doesn't actually work with PHP 7.  In several places, it uses the code pattern "$variable =& new class()" which is now invalid.  The attached patch changes the pattern to "$variable = new class()".

There's an upstream pull request at https://github.com/pear/HTML_QuickForm/pull/7, but upstream has already rejected several requests because HTML_QuickForm has been superseded.

Version-Release number of selected component (if applicable):
php-pear-HTML-QuickForm-3.2.14-3.fc25.noarch

How reproducible:
Always

Steps to Reproduce:
1. Try to load HTML_QuickForm
2.
3.

Actual results:
Default exception handler: Exception - syntax error, unexpected 'new' (T_NEW) Debug: 
Error code: generalexceptionmessage
* line 128 of /usr/share/pear/HTML/QuickForm/RuleRegistry.php: ParseError thrown


Expected results:
It works

Comment 1 Remi Collet 2016-12-08 12:45:39 UTC
My plan is to definitively drop all the old deprecated pear modules.

This one was kept for moodle.
Please file a bug against moodle about this issue.

Comment 3 Fedora Update System 2016-12-08 13:00:37 UTC
php-pear-HTML-QuickForm-3.2.14-4.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-90363b68f4

Comment 4 Jonathan Dieter 2016-12-08 13:09:39 UTC
Thanks for applying this.  I did look into having Moodle just use its bundled HTML-QuickForm (which doesn't have this bug), but ran into file conflicts even when following the packaging guidelines for replacing a symlink with a directory.

I'll see if I can figure out a way to make it work so we can eventually drop this package.

Comment 5 Fedora Update System 2016-12-08 19:26:54 UTC
php-pear-HTML-QuickForm-3.2.14-4.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-90363b68f4

Comment 6 Fedora Update System 2016-12-16 20:59:07 UTC
php-pear-HTML-QuickForm-3.2.14-4.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.