Code doesn't work with php 5.3 because of incompatible object references when generating pdfs.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ela.m’s picture

Status: Needs work » Needs review
sammys’s picture

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 the theme_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.

Strykerraven’s picture

Thanks, This worked for me.

chrisssi’s picture

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

jcnventura’s picture

Status: Needs review » Fixed

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

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.