Jeremy,

That was it! Thank you! The Cake Book says that beforeSave() does not take any 
arguments, otherwise I would have tried this. I shoulda checked the API to be 
sure.

Cheers,
-- 
Brian Allemana
web developer + consultant
773.320.4127
b...@brianallemana.com
web: http://www.brianallemana.com
vCard: http://www.brianallemana.com/vcf

On Aug 9, 2012, at 2:31 AM, Jeremy Burns | Class Outfit wrote:

> Not sure if the issue is the same, but I was getting issues with beforeSave() 
> on PHP 5.4.4. The beforeSave() function must have parameters set the same as 
> parent:beforeSave() - in other words public function beforeSave($options = 
> array()) {} - give that a try.
> 
> Jeremy Burns
> Class Outfit
> 
> http://www.classoutfit.com
> 
> On 9 Aug 2012, at 00:13:03, aquariman <br...@allemana.com> wrote:
> 
>> One other point: I have a beforeSave() call in my model. When I disable that 
>> callback the redirect works fine. But even if all the callback does is 
>> return true, the problem noted below will occur.
>> 
>> With callback and no modification to Controller.php the redirect fails. With 
>> no callback and no modification to Controller.php the redirect works fine. 
>> With callback and some output sent within redirect() in Controller.php, the 
>> redirect works fine.
>> 
>> Odd.
>> 
>> On Wednesday, August 8, 2012 6:00:27 PM UTC-5, aquariman wrote:
>> Hello,
>> 
>> Cake 2.1.3. Here's what I've got in my controller:
>> 
>>      function company_info() {
>>              if ($this->request->is('post')) {
>>                      if ($this->Business->save($this->request->data)) {      
>>                              $this->redirect($this->request->here);
>>                      } else {
>>                              $this->raiseWarning('Your information could not 
>> be saved');
>>                      }
>>              }
>>      }
>> 
>> Problem is, when Cake gets to $this->redirect() it craps out, causing no 
>> output and no redirect (blank screen). Logs show me nothing. However, very 
>> weirdly, if I go to the redirect() method in /lib/Cake/Controller.php and 
>> make the following change at line 788:
>> 
>> if ($exit) {
>>      $this->response->send();
>>         echo 'some random text';
>>      $this->_stop();
>> }
>> 
>> Then it works!! ??? How is it that adding output here makes the redirect 
>> work properly? Is this a bug?
>> 
>> Any help appreciated. Best,
>> -Brian
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "CakePHP" group.
>> To post to this group, send email to cake-php@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> cake-php+unsubscr...@googlegroups.com.
>> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>>  
>>  
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com.
> To unsubscribe from this group, send email to 
> cake-php+unsubscr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.


Reply via email to