mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00: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) {
|
if(!$data) {
|
||||||
$data = array();
|
$data = array();
|
||||||
}
|
}
|
||||||
foreach($data as $k=>$v) {
|
|
||||||
unset($data[$k]);
|
// Convert all keys to lowercase
|
||||||
$data[strtolower($k)] = $v;
|
$data = array_change_key_case($data, CASE_LOWER);
|
||||||
}
|
|
||||||
|
// Purge everything if the type does not match.
|
||||||
if($this->type && $this->type != $data['type']) {
|
if($this->type && $this->type != $data['type']) {
|
||||||
$data = array();
|
$data = array();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user