I'm posting as documentation and have already set the status to fixed.
I upgraded to Ubuntu 12.10 which include PHP 5.4. My fix was to downgrade back to PHP 5.3.
cck_phone I'm using is 7.x-1.x-dev - 2012-Mar-02. My drupal installation is 7.16.
After upgrading to PHP 5.4 I started getting the WSOD. /var/log/apache2/error.log had the following error:
PHP Fatal error: Unsupported operand types in $drupalroot/includes/theme.inc on line 1074, referer: http://cows/views/people/employees
I tracked it down to the following lines in cck_phone.module: line 287 and 318.
// Extension
if (!empty($element['extension'])) {
$phone = $phone . theme('phone_number_extension', $element['extension']);
}
Variable $element['extension'] is a simple string. The theme.inc theme() function expects an array. $element['extension'] becomes '$variables' in the theme function. The error occurs on line 1074 when the $variables array is appended to.
// Merge in argument defaults.
if (!empty($info['variables'])) {
$variables += $info['variables'];
}
elseif (!empty($info['render element'])) {
$variables += array($info['render element'] => array()); // line 1074
}
I'm just learning PHP and don't know what the real fix is, but I'll stick to PHP 5.3 in the meantime
Comment | File | Size | Author |
---|---|---|---|
#10 | cck_phone_theme_fix-1830682-10.patch | 3.29 KB | RoSk0 |
#10 | interdiff-1830682-8-10.txt | 947 bytes | RoSk0 |
#8 | interdiff-8.txt | 1.01 KB | RoSk0 |
#8 | cck_phone_theme_fix-1830682-8.patch | 3.34 KB | RoSk0 |
#6 | cck_phone_theme_fix-1830682-6.patch | 2.99 KB | RoSk0 |
Comments
Comment #1
TuFrac CreditAttribution: TuFrac commentedI had the same problem, I have done this patch, I hope you work
Comment #2
jbehshad CreditAttribution: jbehshad commentedI had the same issue. Patch on #1 works for me. Thank you TuFrac.
Comment #3
mlncn CreditAttribution: mlncn commentedThis is good!
If the current maintainer is not up for committing working patches, let this be the formal request that a co-maintainer be added. I'm willing but i'm sure there are much better candidates.
Comment #4
valthebaldPatch does the job, yet is not quite well formatted. If the author can fix empty lines of changed lines, that would be good
Comment #5
valthebaldHere's my take. I also dared to place better default value for theme_phone_number_extension()
Comment #6
RoSk0More Drupal style fix with minor code style fixes.
Comment #7
valthebaldI second 'render element' => 'variables' replacement in #6
2 tiny things. If we're correcting comments, let's fix some grammar:
Comment #8
RoSk0New version.
Comment #9
valthebaldTiny-tiny thing left:
// Call country default formatter if exist
appears twice in code
Comment #10
RoSk0One more try...
Comment #11
valthebaldLooks good to me
Comment #11.0
valthebaldAdding the current drupal installation revision
Comment #12
ckngThanks for all the works, committed to D7.