0
votes

So I want to use the component from this page https://thoughtwm.com/code/index.php

I set it up the way he writes it by copying&pasting all the code. When I open my images link. I get Warnings.

Warning (2): call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'UploadComponent::initialize' was given [CORE/Cake/Utility/ObjectCollection.php, line 103]

Warning (2): call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'UploadComponent::startup' was given [CORE/Cake/Utility/ObjectCollection.php, line 103]

Warning (2): call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'UploadComponent::beforeRender' was given [CORE/Cake/Utility/ObjectCollection.php, line 103]

Warning (2): call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'UploadComponent::shutdown' was given [CORE/Cake/Utility/ObjectCollection.php, line 103]

1

1 Answers

0
votes

Make sure your Component is in the right place. In app/controllers/components you should have a file called upload.php that has the content of the website you linked. The errors you are getting are because it cant find the methods that are supposed to be in that file.