But this seems to work:
if (!array_key_exists('REMOTE_ADDR', $_SERVER))
{
return parent::save($conn);
}
$user = sfContext::getInstance()->getUser();
...
Tom Haskins-Vaughan wrote:
> But $_SERVER exits even on the CLI :(
>
> Lee Bolding wrote:
>> On 25 Jun 2009, at 15:26, Tom Haskins-Vaughan wrote:
>>
>>> Just come across this problem. What's the best way to test if the model
>>> class is being called by the cli or not?
>> Test for the presence of the $_SERVER array.
>>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" 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/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---