Error: Call to a member function find() on a non-object in cakephp controller

Ich bin neu bei cakephp und habe versucht, zu erzeugen von CRUD-Operationen mit dem Konsolen-tool. Es funktioniert gut, außer für eine Tabelle (die größte).

Wenn Sie versuchen, um ein neues element hinzuzufügen, gibt es:

Error: Call to a member function find() on a non-object
Datei: C:\wamp\www\cakephp\app\Controller\ChantiersController.php
Line: 50

Hier ist die Linie 50 und darüber hinaus:

    $programs = $this->Chantier->Program->find('list');
    $etats = $this->Chantier->Etat->find('list');
    $types = $this->Chantier->Type->find('list');
    $champsLibres = $this->Chantier->ChampsLibre->find('list');
    $feuillesDeRoutes = $this->Chantier->FeuillesDeRoute->find('list');
    $directionsPilotes = $this->Chantier->DirectionsPilote->find('list');
    $this->set(compact('programs', 'etats', 'types', 'champsLibres',    
            'feuillesDeRoutes', 'directionsPilotes'));
Zeig bitte die Ausgabe von var_dump($this->Chantier->Program);
können Sie include-Zeile 49 nur für den Fall?

InformationsquelleAutor L. Sanna | 2012-07-13

Schreibe einen Kommentar