[CakePHP : The Rapid Development Framework for PHP] #5804: HABTM saveMulti issues warning when given empty selection
#5804: HABTM saveMulti issues warning when given empty selection +--- Reporter: benjam | Type: Bug Status: new | Priority: High Milestone: 1.2.x.x | Component: Model Version: RC3 | Severity: Normal Keywords: habtm saveMulti | Php_version: PHP 5 Cake_version: 1.2.0.7692 RC3 | +--- This is nearly exactly the same bug as #3920, but it seems the function has changed slightly and lost the fix that was given in that bug.[[BR]] [[BR]] When I submit a form with a HABTM relationship, but the HABTM relationship value is empty, Cake throws the following error:[[BR]] {{{ Warning (2): Invalid argument supplied for foreach() [ROOT\cake\cake\libs\model\model.php, line 1230] }}} [[BR]] It appears that the test for empty was removed somewhere between RC2 and RC3.[[BR]] [[BR]] A possible fix for the error is the following:[[BR]] On line 1213 of model.php, insert the following:[[BR]] {{{ if (empty($data)) { $data = array( ); } }}} -- Ticket URL: https://trac.cakephp.org/ticket/5804 CakePHP : The Rapid Development Framework for PHP https://trac.cakephp.org/ Cake is a rapid development framework for PHP which uses commonly known design patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups tickets cakephp group. To post to this group, send email to tickets-cakephp@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/tickets-cakephp?hl=en -~--~~~~--~~--~--~---
Re: [CakePHP : The Rapid Development Framework for PHP] #5804: HABTM saveMulti issues warning when given empty selection
#5804: HABTM saveMulti issues warning when given empty selection +--- Reporter: benjam | Owner: Type: Bug |Status: closed Priority: High | Milestone: 1.2.x.x Component: Model| Version: RC3 Severity: Normal |Resolution: needmoreinfo Keywords: habtm saveMulti | Php_version: PHP 5 Cake_version: 1.2.0.7692 RC3 | +--- Changes (by gwoo): * status: new = closed * resolution: = needmoreinfo Comment: please look at the test cases. This should be covered there. If you do not find it, please submit a a diff with a new test. -- Ticket URL: https://trac.cakephp.org/ticket/5804#comment:1 CakePHP : The Rapid Development Framework for PHP https://trac.cakephp.org/ Cake is a rapid development framework for PHP which uses commonly known design patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups tickets cakephp group. To post to this group, send email to tickets-cakephp@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/tickets-cakephp?hl=en -~--~~~~--~~--~--~---
Re: [CakePHP : The Rapid Development Framework for PHP] #5804: HABTM saveMulti issues warning when given empty selection
#5804: HABTM saveMulti issues warning when given empty selection +--- Reporter: benjam | Owner: Type: Bug |Status: closed Priority: High | Milestone: 1.2.x.x Component: Model| Version: RC3 Severity: Normal |Resolution: needmoreinfo Keywords: habtm saveMulti | Php_version: PHP 5 Cake_version: 1.2.0.7692 RC3 | +--- Comment (by benjam): Hmmm... it appears this was fixed with the previous bug submission in [6546]. Then the fix was removed in [7795], and then it was fixed again via a different method in [7800] and is currently fixed in the HEAD.[[BR]] [[BR]] So... sorry to bother you. Must have grabbed a version at just the right time to see this error again.[[BR]] [[BR]] Glad it's fixed though. Keep up the great work. -- Ticket URL: https://trac.cakephp.org/ticket/5804#comment:2 CakePHP : The Rapid Development Framework for PHP https://trac.cakephp.org/ Cake is a rapid development framework for PHP which uses commonly known design patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups tickets cakephp group. To post to this group, send email to tickets-cakephp@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/tickets-cakephp?hl=en -~--~~~~--~~--~--~---