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

Error when exporting link field #47

@wouter-vs

Description

@wouter-vs

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions