export
export copied to clipboard
Error when exporting link field
When creating an export of content with a link field an error is thrown.
mb_strlen() expects parameter 1 to be string, object given
` /vagrant/craft/app/helpers/ArrayHelper.php(236)
224 // Private Methods 225 // ========================================================================= 226 227 /** 228 * The array_filter() callback function for filterEmptyStringsFromArray(). 229 * 230 * @param string $val 231 * 232 * @return bool 233 */ 234 private static function _isNotAnEmptyString($val) 235 { 236 return (mb_strlen($val) != 0); 237 } 238 }`
The problem is that the link field contains objects like the Craft\ElementCriteriaModel object that are getting passed to the filterEmptyStringsFromArray method. I think these should already be filtered out before passing it to the ArrayHelper class.