mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00: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) {
|
private function dataObjectArrayMatch($item, $match) {
|
||||||
foreach($match as $k => $v) {
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user