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.

CommentFileSizeAuthor
#1 forum_preselect.1775366.1.patch530 bytessalvis
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

salvis’s picture

Status: Active » Needs review
FileSize
530 bytes

The attached patch fixes both issues.

larowlan’s picture

Version: 6.x-dev » 8.x-dev
Status: Needs review » Postponed (maintainer needs more info)

I'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.

larowlan’s picture

Version: 8.x-dev » 6.x-dev
Status: Postponed (maintainer needs more info) » Needs review

After 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

salvis’s picture

The 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.

salvis’s picture

I 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!

riteshsarraf’s picture

Issue summary: View changes

This 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.

blood’s picture

1: forum_preselect.1775366.1.patch queued for re-testing.

Status: Needs review » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.

izmeez’s picture

Title: Warnings and unselected forum when creating new forum topic » [core] Warnings and unselected forum when creating new forum topic
Project: Drupal core » Drupal 6 Long Term Support
Version: 6.x-dev »
Component: forum.module » Code
Status: Closed (outdated) » Needs review

Patch in comment #1 is required to prevent warnings with newer versions of php including php 7.4 and applies to current d6lts git repo.

izmeez’s picture

Status: Needs review » Reviewed & tested by the community

Changing status to RTBC.