mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: replace foreach loop with a core function call
This commit is contained in:
parent
1c8d39be4c
commit
32817b4133
@ -224,10 +224,11 @@ class Oembed_Result extends ViewableData {
|
||||
if(!$data) {
|
||||
$data = array();
|
||||
}
|
||||
foreach($data as $k=>$v) {
|
||||
unset($data[$k]);
|
||||
$data[strtolower($k)] = $v;
|
||||
}
|
||||
|
||||
// Convert all keys to lowercase
|
||||
$data = array_change_key_case($data, CASE_LOWER);
|
||||
|
||||
// Purge everything if the type does not match.
|
||||
if($this->type && $this->type != $data['type']) {
|
||||
$data = array();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user