mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 10:36:16 +00:00
Fixed PHP warning showing up on some extract queries
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6658 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
1fdd44f6b2
commit
de4807e726
2 changed files with 10 additions and 0 deletions
|
@ -487,6 +487,9 @@ class Set extends Object {
|
|||
continue;
|
||||
}
|
||||
list(,$key,$op,$expected) = $match;
|
||||
if (!isset($data[$key])) {
|
||||
return false;
|
||||
}
|
||||
$val = $data[$key];
|
||||
if ($op == '=' && $val != $expected) {
|
||||
return false;
|
||||
|
|
|
@ -470,6 +470,13 @@ class SetTest extends UnitTestCase {
|
|||
'text' => 'Comment 5',
|
||||
),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'Article' => array(
|
||||
'id' => 3,
|
||||
'name' => 'Article 3',
|
||||
),
|
||||
'Comment' => array(),
|
||||
)
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue