mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR: Updated SapphireTest::dataObjectArrayMatch() to use array_key_exists() rather than isset(). This allows tempting for NULL values in DOS assertion methods.
This commit is contained in:
parent
3fbb29a6c5
commit
ff3d3816ca
@ -659,7 +659,7 @@ class SapphireTest extends PHPUnit_Framework_TestCase {
|
||||
*/
|
||||
private function dataObjectArrayMatch($item, $match) {
|
||||
foreach($match as $k => $v) {
|
||||
if(!isset($item[$k]) || $item[$k] != $v) return false;
|
||||
if(!array_key_exists($k, $item) || $item[$k] != $v) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user