1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-18 04:22:10 +02:00

Fix issue processwire/processwire-issues#485 where attempting to use numeric index with WireData could halt request/memory error

This commit is contained in:
Ryan Cramer
2018-02-05 06:09:54 -05:00
parent e21c965f7b
commit f89544ea04

View File

@@ -59,7 +59,7 @@ class WireData extends Wire implements \IteratorAggregate, \ArrayAccess {
*
*/
public function set($key, $value) {
if($key == 'data') {
if($key === 'data') {
if(!is_array($value)) $value = (array) $value;
return $this->setArray($value);
}