You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Array to string conversion on line 296 in .../silverstripe/tagfield/src/StringTagField.php:
289 /**
290 * Ensure that arrays are imploded before being saved
291 *
292 * @return mixed|string
293 */
294 public function dataValue()
295 {
296 return implode(',', $this->value);
297 }
It appears $this->value is either a plain array, or an associative array of Title => Value pairs (when altered) at this point: print_r($this->value) -> Array ( [0] => Array ( [Title] => one [Value] => one ) )
Seems looping over the items and using the 'Value' if defined, string item itself otherwise, fixes this:
Array to string conversion on line 296 in .../silverstripe/tagfield/src/StringTagField.php:
It appears
$this->value
is either a plain array, or an associative array of Title => Value pairs (when altered) at this point:print_r($this->value) -> Array ( [0] => Array ( [Title] => one [Value] => one ) )
Seems looping over the items and using the 'Value' if defined, string item itself otherwise, fixes this:
If anyone can reproduce and this quick-fix seems acceptable, I'd be happy to create a PR for it.
The text was updated successfully, but these errors were encountered: