Download & Extend

Actions define $image as passed by reference, but call_user_func doesn't support this

Project:ImageCache
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

In _imagecache_apply_action() the specific action is applied by using call_user_func() even though the actions expects the $image to be passed by reference. Is it the actions which are implemented wrong or the use of call_user_func instead of call_user_func_array?

I my case I have a crop action which depends on another preset modifying the $image object. This patch solves that.

AttachmentSizeStatusTest resultOperations
call_user_func_reference.patch1.12 KBIgnored: Check issue status.NoneNone

Comments

#1

if image is an object then it should be passed by reference right?

#2

Why not just ignore the whole call_user_func() bit? We don't have a dynamic number of arguments. Objects are passed by reference implicitly.

AttachmentSizeStatusTest resultOperations
imagecache_335780.patch1.46 KBIgnored: Check issue status.NoneNone

#3

Status:needs review» fixed

committed the attached to HEAD.

AttachmentSizeStatusTest resultOperations
imagecache_335780.patch1.41 KBIgnored: Check issue status.NoneNone

#4

Status:fixed» closed (fixed)

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

nobody click here