OK, I have managed to avoid the error by wrapping this around the class
definition code in customer.php:

if ( !class_exists("Customer") ) {
.
.
.
}

I no longer get errors when attempting to view agents, but the data
from the customer class does not seem to be available. I have set up
the following test function in the AgentsController:

function test($id = null) {

        $this->Agent->id = $id;
        $this->set('agent', $this->Agent->read());

}

Accompanied by the corresponding test.thtml:

<?php

        echo "Username: " . $agent['Agent']['username'];

?>

This gives me the warning:

Notice: Undefined index: username in
/srv/www/htdocs/cake/app/views/agents/test.thtml on line 4

I also tried the following code, just to see if it would work:

echo "Username: " . $agent['Agent']['username'];

Which gave the error:

Notice: Undefined index: Customer in
/srv/www/htdocs/cake/app/views/agents/test.thtml on line 4

Anyway, if anyone could shed some light on this I would be very
grateful.

Thanks,
Joel


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
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