That all looks good to me. Try deleting the files in app/tmp/cache/models With PHP5.x you don't need the line var $name = 'addresses';
On Mon, Oct 15, 2012 at 7:58 PM, Russell Brown <[email protected]> wrote: > Error: Call to a member function find() on a non-object > File: c:\wamp\www\cake222\app\Controller\AddressesController.php > > I get the error on the $this->set('address_list', > $this->Address->find('all')) line below: > > Partial listing of my AddressesController file: > > <?php > class AddressesController extends AppController { > var $name = 'addresses'; > > function index($id = null) { > $this->set('address_list', $this->Address->find('all')); > } > > I have a controller called AddressesController.php. I have a Model called > Address.php. The table is called addresses. > > I am using Cake 2.2.2 and PHP 5.3.8 and Apache 2.2.21 and MySQL 5.5.16 > > -- > Like Us on FaceBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > Visit this group at http://groups.google.com/group/cake-php?hl=en. > > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. Visit this group at http://groups.google.com/group/cake-php?hl=en.
