Module: Topic Poll
Posted by Maurice Makaay
April 22, 2016 01:59AM |
Admin Registered: 19 years ago Posts: 746 |
Quote
pierrexuso
Poll-Software without multiple choice option?
Feel free to add it and publish a new version of this module... ;)
Regards
Oliver
Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
September 01, 2016 09:33AM |
Admin Registered: 19 years ago Posts: 746 |
New Version:
Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
2016-09-01 v1.0.22 Oliver Riesen-Mallmann <oliver@riesen.org> - Made XHTML 1.0 Transitional compliant.
Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: Module: Topic Poll September 23, 2024 10:06AM |
Registered: 17 years ago Posts: 50 |
(Copying this here from the wrong place)
Hi
Moving from PHP 7.4 to 8.3,
I just checked 1.0.22 and it still uses each().
Hi
Moving from PHP 7.4 to 8.3,
[23-Sep-2024 12:31:10 UTC] PHP Fatal error: Uncaught Error: Call to undefined function each() in /path/to/phorum/mods/topic_poll/topic_poll.php:389 Stack trace: #0 /path/to/phorum/common.php(1909): phorum_mod_topic_poll_read() #1 /path/to/phorum/read.php(754): phorum_hook() #2 {main} thrown in /path/to/phorum/mods/topic_poll/topic_poll.php on line 389The offending line is
and the cause is that each() was deprecated in PHP 7.2 and was removed in 8.0.Language: PHPlist ($message_id, $message) = each($messages);
I just checked 1.0.22 and it still uses each().
Re: Module: Topic Poll September 23, 2024 10:36PM |
Admin Registered: 19 years ago Posts: 575 |
You can try the following. Pretty much do it yourself.
[github.com]
[stackoverflow.com]
[www.google.com]
[github.com]
[stackoverflow.com]
[www.google.com]
Re: Module: Topic Poll September 24, 2024 03:40AM |
Registered: 17 years ago Posts: 50 |
Quote
Scott Finegan
You can try the following. Pretty much do it yourself.
Thanks, but if I fix my own the module will still be broken. And it is an active and useful module. And it's only this one line of code that breaks it. Everywhere else foreach() is used, so I suspect that this one instance of each() is purely accidental. So from every point of view it would be much better to have it fixed at the source.
September 24, 2024 04:05AM |
Admin Registered: 19 years ago Posts: 746 |
Hi Zenon,
I try to publish a new version of the module.
Regards
Oliver
Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
I try to publish a new version of the module.
Regards
Oliver
Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
September 24, 2024 09:11AM |
Admin Registered: 19 years ago Posts: 746 |
Hi Zenon,
since there are few other passages with "each" in the source code and perhaps also in other modules, I think we should use a funtion to replace "each()" like in polyfill-each: [github.com]
Copy the content of polyfill-each.php to common.php after line 72.
Regards
Oliver
Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
since there are few other passages with "each" in the source code and perhaps also in other modules, I think we should use a funtion to replace "each()" like in polyfill-each: [github.com]
Copy the content of polyfill-each.php to common.php after line 72.
Regards
Oliver
Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: Module: Topic Poll September 26, 2024 07:42AM |
Registered: 17 years ago Posts: 50 |
Hi
You mean in the source code of phorum itself, I assume. Because there is only one instance of each() in topic_poll.
Anyway, I have a somewhat unusual setup, with phorum on a distributed glusterfs filesystem on three machines. So each of these three machines sees one and the same filesystem and files on it. But machine A runs almalinux 8.x with PHP 7.4 and machines B and C run almalinux 9.x with PHP 8.3. All three run a webserver. This means that I can switch back and fro between the same (5.2.23) phorum installation on PHP 7.4 or 8.3 just by toggling /etc/hosts on my workstation.
So I added 'require_once("./include/polyfill-each.php");' in common.php. polyfill-each does nothing if each() already exists, so 7.4 still works fine. 8.3 however breaks elsewhere with
Cheers
Quote
Oliver Riesen-Mallmann
since there are few other passages with "each" in the source code and perhaps also in other modules, I think we should use a funtion to replace "each()" like in polyfill-each: [github.com]
You mean in the source code of phorum itself, I assume. Because there is only one instance of each() in topic_poll.
Anyway, I have a somewhat unusual setup, with phorum on a distributed glusterfs filesystem on three machines. So each of these three machines sees one and the same filesystem and files on it. But machine A runs almalinux 8.x with PHP 7.4 and machines B and C run almalinux 9.x with PHP 8.3. All three run a webserver. This means that I can switch back and fro between the same (5.2.23) phorum installation on PHP 7.4 or 8.3 just by toggling /etc/hosts on my workstation.
So I added 'require_once("./include/polyfill-each.php");' in common.php. polyfill-each does nothing if each() already exists, so 7.4 still works fine. 8.3 however breaks elsewhere with
PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in /path/to/phorum/include/upload_functions.php on line 107That raises two questions:
- Will phorum be updated for PHP 8.x?
- Should we move this discussion to the main 5.2 support forum?
Cheers
Sorry, only registered users may post in this forum.