<p>I tried removing a few of the options from one of the Dropdowns within the Matrix and lo-and-behold, the errors are gone. Thanks so much! I guess I hit some kind of limit?</p>

CC BY-SA 3.0
2017-12-14T09:20:57.840Z
2017-12-14T09:20:57.840Z
Chris
<p>I've added many fields in the past with success but today, on my local MAMP server, after adding a new field to a Matrix and saving, I'm getting a PHP error when I try to view the entry's admin page, the page preview, or try to add a new entry.</p>

<p>Thankfully removing that field and saving gets me back to where I was. The CMS is up to date. Here is the error when trying to view the entry's admin, I can post more if it helps (the stack trace has 70+ errors in it):</p>

<p><a href="https://i.sstatic.net/jrhIK.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/jrhIK.png" alt="PHP error"></a>
When creating a new entry, the error is also on BaseOptionsFieldType.php but line 362:</p>

<p><code>if ($option['value'] == $value)</code></p>

<p>Would anyone have any ideas for getting around this? The field I want to add is a Lightswitch but I get the same error when trying a Plain Text field.</p>

CC BY-SA 3.0
2017-12-13T17:06:19.123Z
A little work around would be to check if the key in this array is set/exists to not get the error. Do you have the latest craft version?
Robin Schambach
CC BY-SA 3.0
2017-12-13T23:52:41.500Z
Is it a particularly large Matrix field?  How many blocks/fields are in it?
Brad Bell
CC BY-SA 3.0
2017-12-14T09:20:09.140Z
Thanks both. Robin I got the error on an older version from a few months ago, but I updated and got more-or-less the same error. Brad, the Matrix field has 12 block types set up, with each of those averaging three fields. Some of those fields use Super Tables and a couple of those have Dropdowns with around 15 options (think I'll rework things there when I get a chance!). You've led me to the solution - I will post it as the answer.
Chris
<entry><error-message><php>
PHP error after adding new field
# PHP error after adding new field

(Asked by: username_0 on 2017-12-13)

I've added many fields in the past with success but today, on my local MAMP server, after adding a new field to a Matrix and saving, I'm getting a PHP error when I try to view the entry's admin page, the page preview, or try to add a new entry.

Thankfully removing that field and saving gets me back to where I was. The CMS is up to date. Here is the error when trying to view the entry's admin, I can post more if it helps (the stack trace has 70+ errors in it):

[![PHP error](https://i.sstatic.net/jrhIK.png)](https://i.sstatic.net/jrhIK.png)
When creating a new entry, the error is also on BaseOptionsFieldType.php but line 362:

`if ($option['value'] == $value)`

Would anyone have any ideas for getting around this? The field I want to add is a Lightswitch but I get the same error when trying a Plain Text field.

**Tags:** entry, error-message, php
> **Comments:**
> **username_1**: A little work around would be to check if the key in this array is set/exists to not get the error. Do you have the latest craft version?  
> **username_2**: Is it a particularly large Matrix field?  How many blocks/fields are in it?  
> **username_0**: Thanks both. Robin I got the error on an older version from a few months ago, but I updated and got more-or-less the same error. Brad, the Matrix field has 12 block types set up, with each of those averaging three fields. Some of those fields use Super Tables and a couple of those have Dropdowns with around 15 options (think I'll rework things there when I get a chance!). You've led me to the solution - I will post it as the answer.  

---

## 1 answers

### Answer by username_0 on 2017-12-14. Score: 0 | Accepted answer

I tried removing a few of the options from one of the Dropdowns within the Matrix and lo-and-behold, the errors are gone. Thanks so much! I guess I hit some kind of limit?


---

