Setting up webcam fails. No documentation found to assist with install. Full message block from top of webcam page.

warning: Parameter 1 to theme_webcams_webcam() expected to be a reference, value given in /home/jim/drupal.wingbarscafe.com/includes/theme.inc on line 656.

Using a fresh Drupal install with the default theme.

Comments

wingbarscafe’s picture

Assigned: wingbarscafe » Unassigned
miaoulafrite’s picture

+1

wingbarscafe’s picture

This was finally resolved by downgrading php from 5.3 to 5.2. Works as expected with php 5.2.17

aorovitz’s picture

I realize that this is an old issue but I think the Webcam module is an important one that many Drupal users would like to use. I looked at the code but am unable to figure out what the problem may be with newer versions of PHP. Speaking for myself, rolling back to an older version of PHP is not an option. There are too many bug fixes, security patches and other improvements in recent PHP 5.3x versions to risk going backwards. I would really like to have a working Webcam module and would greatly appreciate any advice anyone can offer. Thanks.

sjpatrick’s picture

Component: Documentation » Code
Status: Active » Needs review
StatusFileSize
new575 bytes
new564 bytes

After looking up the general error as it might apply to other modules (which it does), I found a solution that seems to work.
In the function declaration for theme_webcams_webcam() in webcams.module, remove the ampersand marking the $webcam parameter as a reference.
I've tested this change on two installations and it appears to work as intended.
Included are patches for the 6.x-1.4 stable release and the 6.x-1.x dev branch.