PHP Warning - Call-time pass-by-reference has been deprecated

ktleow - September 17, 2008 - 15:56
Project:Image Caption
Version:6.x-2.2
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

I've recently discovered that my Apache web server log file is flooded with this error:
PHP Warning:  Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of preg_match().  If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in blablabla\\sites\\all\\modules\\image_caption\\contrib\\image_caption_filter.module on line 62

Nobody else had this problem? I couldn't find any other similar issue on this.

#1

curagea - October 21, 2008 - 20:22

Having the same issue.

#2

karschsp - November 5, 2008 - 01:54

Not sure if this is the best solution to the issue, but if you go into image_caption_filter.module file and find the doImgTitles function, change all of the &$matches to just $matches. That seemed to fix it for me. I guess I need to figure out how to write a patch and submit it.

#3

ktleow - November 9, 2008 - 10:01

No replies from the maintainer(s) ??

#4

davidwhthomas - November 9, 2008 - 10:11

Thanks for the code.

$matches doesn't need to be passed by reference anyway as it only stores the results of the preg_match evaluation in an array.

either that or setting allow_call_time_pass_reference to true in your php.ini

I think the above code should do the trick and I'll commit the update shortly for this contrib module.

regards,

DT

#5

ktleow - November 9, 2008 - 10:18

Thank you for the response =)

I didn't know about this till my error log was flooded with this allow_call_time_pass_reference errors.

And since I'm using a shared hosting, asking them to enable allow_call_time_pass_reference isn't easy.

#6

davidwhthomas - November 15, 2008 - 00:05
Status:active» fixed

This has been fixed in the 6-2 dev version and released in the 6-2.3 tagged version

#7

System Message - November 29, 2008 - 00:12
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.