Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Running under PHP 5.4.4, when I click on the Post new Forum topic on the forum/TID page, then I get two warnings...
Warning: Creating default object from empty value in forum_nodeapi() (line 219 of d6\modules\forum\forum.module).
Warning: Creating default object from empty value in forum_nodeapi() (line 220 of d6\modules\forum\forum.module).
... and the forum is not preselected in drop-down selection control.
Comment | File | Size | Author |
---|---|---|---|
#1 | forum_preselect.1775366.1.patch | 530 bytes | salvis |
Comments
Comment #1
salvisThe attached patch fixes both issues.
Comment #2
larowlanI'm not certain about Drupal 6's support for php 5.4.4, postponing for now.
Regardless this will need to be resolved in Drupal 8 first (if it exists) and backported.
Comment #3
larowlanAfter speaking with folks in #drupal-contribute, Drupal 6 supports php 5.3 (from 6.14 onwards).
Php 5.4 isn't officially supported but patches that don't break php 4.4 will be accepted.
Needs to be manually tested on php 4.4
Comment #4
salvisThe issue does not exist in D7.
It's funny, this issue came up three years ago (#581000: strict warning: Creating default object from empty value... line 220.). At the time it was just a strict warning, but now it breaks functionality in D6.
Comment #5
salvisI installed PHP 4.4.0, only to find out that I cannot install D6, beause common.inc has a try block — AFAIK exceptions were introduced in PHP5!
Comment #6
riteshsarraf CreditAttribution: riteshsarraf commentedThis is an interesting problem. I hit it in my mailhandler module, which auto-creates forum topics based on emails received.
Is it really a hard dependency on PHP versions ?
I ask because I ensure to keep my LAMP platform up-to-date, across major upgrades.
For Drupal, I ensure that I'm on the latest 6.x security update.
But from what I read in this ticket, the combination of Drupal stable + LAMP Stable may not work. Because Drupal has hard dependency on PHP versions, which, based on what LAMP upgrades you make, will change.
Comment #7
blood CreditAttribution: blood commented1: forum_preselect.1775366.1.patch queued for re-testing.
Comment #9
izmeez CreditAttribution: izmeez commentedPatch in comment #1 is required to prevent warnings with newer versions of php including php 7.4 and applies to current d6lts git repo.
Comment #10
izmeez CreditAttribution: izmeez commentedChanging status to RTBC.