This module seems to have serious issues with PHP 5.3
Uploading a file to a comment causes the following error:
warning: Parameter 1 to theme_comment_upload_form_current() expected to be a reference, value given in /var/www/drupal/httpdocs/includes/theme.inc on line 617.
Worse, the upload fails. Additionally, editing a comment with an upload already on it garbles the form (see attached image) and generates the same error as above.
Am thinking this is probably critical, although the adoption of PHP 5.3 may not be that fast.
Comments
Comment #1
heine commentedPHP 5.3 is not supported.
Comment #2
berdirNice trick @ Heine :)
Removing the & from the theme function and also changing the form_alter() implementation in the js callback. Not sure if $form_state is for a reason explicitly an empty array but I left it like that.
Comment #3
mikejonesok commentedThanks for the patch. Works great!
Comment #4
jrdixey commentedWould this patch break the module under PHP 5.2? I'm on Bluehost and I am pretty sure they don't do notifications in advance of PHP version upgrades, so I'd rather patch it beforehand, rather than waiting for the current version of comment_upload to fail if and when they get around to upgrading to PHP 5.3 ...
Comment #5
berdirNo, it should work perfectly fine with PHP 5.2 and older versions.
Comment #6
heine commentedMarked #840124: warning: Parameter 1 to theme_comment_upload_form_current() expected to be a reference. a duplicate.
Comment #7
abw commentedWorks. Thanks!
Comment #8
jgrauman commentedFYI: The patch fixed this problem for me too...
Comment #9
basvredelingThe patch from #2 works fine. Confirmed by 3 people, RTBC
Comment #10
aharown07 commentedTested on D6.20 on Php5.3 and nginx web server.
Works like a charm. Maybe commit soon?
Comment #11
radler commentedWorks perfectly. Thanks!
Comment #12
mrharolda commentedWorks like a charm! Too bad this isn't committed and released...
Comment #14
Bammes commentedWorks great! Thanks!
Comment #15
basvredelingIt's been a year and a half since this patch was uploaded, is there any reason why it hasn't been committed?
Comment #16
heine commentedComment #17
alan d. commented+1 Patch prevents errors on PHP5.3 / Drupal 6.22.
Comment #18
jdwfly commentedPlease commit!
+1
Comment #19
basvredeling@heine could you clarify why the patch is not ready to be tested yet and why the status of this issue has been reverted to reviewed & tested? You forgot to comment on the change in #16
php5.3 is pretty widespread and has been for quite some time now. But in this issue no progress has been made in 2 years (since the patch 's been submitted).
FYI: I mostly need this fix because comment_upload is part of the open atrium distro. Each time that gets updated I need to patch our various atrium installations to remove the errors our users are complaining about during upload. They see about 8 errors each time they upload a file via comment_upload. Would be very nice if patching the module wasn't necessary any more.
Comment #20
berdirBecause RTBC is the correct status. That means it's ready to be commited. patch (to be ported) has a completely different meaning and means an already commited patch needs to be ported to another version of the module.
Please read the linked documentation pages for more information.
Comment #21
basvredelingthanks, my bad...
which leaves the question: why isn't it commited?
Comment #22
dwwBecause this module is almost entirely unmaintained. :/
However, I just tested and confirmed that this fixes lots of problems on my 5.3 test site, and yet still works fine on a 5.2 test site. Committed and pushed to 6.x-1.x. This will be out in alpha6.
Comment #23
basvredelingthanks for the reply and the commit!