#4709: Set::combine returns array_combine warning when encountering an empty
array
---------------------------------------------------------+------------------
Reporter: Laeffe | Owner:
the_undefined
Type: Bug | Status:
reopened
Priority: Medium | Milestone:
1.2.x.x
Component: Core Libs | Version: RC1
Severity: Normal | Resolution:
Keywords: set combine warning array_combine Laeffe | Php_version: n/a
Cake_version: 1.2.0.6311 |
---------------------------------------------------------+------------------
Changes (by techlands):
* status: closed => reopened
* resolution: invalid =>
Comment:
I have run into this same problem..
cake ver: 1.2.2.8120
Warning (2): array_combine() [function.array-combine]: Both parameters
should have an equal number of elements [CORE\cake\libs\set.php, line 976]
$keys and $vals should be checked for equal size before being passed to
array_combine to prevent a php warning
{{{
//Add this fix
if (count($keys) != count($vals)) return array();
return array_combine($keys, $vals);
}}}
--
Ticket URL: <https://trac.cakephp.org/ticket/4709#comment:7>
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 [email protected]
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
-~----------~----~----~----~------~----~------~--~---