<p>Solved it. The problem was with this field:</p>

<pre><code>&lt;input type="hidden" name="fields[gdprPermissionsList][permissionSales][fields][lastChangedDate][date]" value="{{ now|date("m/d/Y") }}"&gt;
</code></pre>

<p>The <code>[date]</code> part was to much and it saved the value in Craft as a literal string: <code>{"date":"07\/11\/2018"}</code> instead of the formatted date.</p>

<p>In one of the Craft updates that throws an error, maybe because it ses it as an object/array due to the curly brackets or maybe because that string has an emoji shortcut in it?</p>

CC BY-SA 4.0
2018-07-12T11:15:27.820Z
2018-07-12T11:15:27.820Z
Tom De Smet
<p>I updated a Craft 2.6 installation to the latest 2.6.x and suddenly I get an error when saving a user's profile on the frond end:</p>

<pre><code>mb_detect_encoding() expects parameter 1 to be string, array given
/data/sites/web/boumaticdevbuthostcom/subsites/corporate-web.boumatic.dev.buthost.com/craft/app/vendor/elvanto/litemoji/src/LitEmoji.php(108)
</code></pre>

<p>However, nowhere on that page has an emoji been inserted in any input fields or anything.</p>

<p>I hope somebody can help me with this as it is an urgent issue.</p>

<p><strong>UPDATE</strong></p>

<p>I just tracked down the problem to this input field:</p>

<pre><code>&lt;input type="hidden" name="fields[gdprPermissionsList][permissionSales][type]" value="permissionInfo"&gt;
</code></pre>

<p>Which is quite weird as it does the exact same thing as 3 other fields on that page which work fine.</p>

<error><bug>
Emoji mb_detect_encoding() error when updating to latest Craft 2.6.x
# Emoji mb_detect_encoding() error when updating to latest Craft 2.6.x

(Asked by: username_0 on 2018-07-12)

I updated a Craft 2.6 installation to the latest 2.6.x and suddenly I get an error when saving a user's profile on the frond end:
mb_detect_encoding() expects parameter 1 to be string, array given
/data/sites/web/boumaticdevbuthostcom/subsites/corporate-web.boumatic.dev.buthost.com/craft/app/vendor/elvanto/litemoji/src/LitEmoji.php(108)

However, nowhere on that page has an emoji been inserted in any input fields or anything.
I hope somebody can help me with this as it is an urgent issue.
UPDATE
I just tracked down the problem to this input field:


Which is quite weird as it does the exact same thing as 3 other fields on that page which work fine.

**Tags:** error, bug

---

## 1 answers

### Answer by username_0 on 2018-07-12. Score: 1 | Accepted answer

Solved it. The problem was with this field:


The [date] part was to much and it saved the value in Craft as a literal string: {"date":"07\/11\/2018"} instead of the formatted date.
In one of the Craft updates that throws an error, maybe because it ses it as an object/array due to the curly brackets or maybe because that string has an emoji shortcut in it?


---

