Skip to content
This repository has been archived by the owner on Apr 5, 2018. It is now read-only.

Error when exporting link field #47

Open
wouter-vs opened this issue Nov 23, 2017 · 0 comments
Open

Error when exporting link field #47

wouter-vs opened this issue Nov 23, 2017 · 0 comments

Comments

@wouter-vs
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant