Hello
For a couple of hours I am having a hard time to use one component in 
another. I used the steps from the cookbook but when i call the method of a 
component i get an error - calling a member of a non object. I'm really 
frustrated and really dont know what to do. Both components are normally 
loaded via the page controller but not one from the other. If someone could 
handle it i would be super greatful.

file: app/Controler/Component/UrlUploadComponent.php
<?php
include('EmbedDatabaseStorage.php');
include('UrlFilter.php');

class UrlUploadComponent extends Component{
    public $name = 'UrlUpload';
    public $components = array('FileUpload');
    
    (private objects)

    public function UrlUploadComponent(){
        (some object creation)
    }
    
    public function Upload($url){
        (...)
            switch(strtolower($contentType)){
                case 'image/gif':
                case 'image/jpeg':
                case 'image/bmp':
                case 'image/png':
                    $this->FileUpload->Upload($data); //ERROR HERE
                break;
                default:
                    $this->embedStorage->Store($data);
                break;
            }
        }
    }
}
?>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to