Posted by ela.m on April 29, 2010 at 2:53pm
| Project: | Printer, e-mail and PDF versions |
| Version: | 6.x-1.10 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Code doesn't work with php 5.3 because of incompatible object references when generating pdfs.
| Attachment | Size |
|---|---|
| patch_print_pdf_compatibility_php_5_3.txt | 2.48 KB |
Comments
#1
#2
Hi there. Thanks for the bug report and patch. It most certainly fixes the problem on PHP 5.3 and has solved my problem.
Unfortunately, Drupal 6 has a base level of PHP 4 and, as a result, your patch will most likely not work because objects/arrays are not passed by reference automatically. I.e
theme()will not send object references to thetheme_print_pdf_*()functions in PHP 4. This will probably prevent your patch from being accepted by the maintainer.As I said, it will most likely not work so I'm leaving this as needs review pending some testing and/or patch fixing on PHP 4.
I've rerolled the patch to remove the upper directories so the patch applies with -p0.
#3
Thanks, This worked for me.
#4
Can't get it to work because of HUNKs.
Drupal 6.17, print.module 6x 1.10 on ubuntu server 10.04 64Bit.
Program "patch" is installed and I did
patch print < xxxxx.patch
#5
Actually, because of this incompatibility between PHP 5.3 and the older versions, the solution is to stop passing stuff by reference..
When Drupal 8 comes around, maybe that will use PHP 5.3 as minimum and then we can safely assume that it is safe to use references. Until then, everything will be passed by value.
I have committed to CVS a patch that removes all the by-reference arguments.
João Ventura
#6
Automatically closed -- issue fixed for 2 weeks with no activity.