Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-14T09:20:57.840Z
Answers.LastActivityDate: 2017-12-14T09:20:57.840Z
Answers.UserDisplayName: Chris
Body: <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>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-13T17:06:19.123Z
Comments.Text: 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?
Comments.UserDisplayName: Robin Schambach
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-13T23:52:41.500Z
Comments.Text: Is it a particularly large Matrix field?  How many blocks/fields are in it?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-12-14T09:20:09.140Z
Comments.Text: 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.
Comments.UserDisplayName: Chris
Tags: <entry><error-message><php>
Title: PHP error after adding new field
ThreadText: # 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. username_1 I got the error on an older version from a few months ago, but I updated and got more-or-less the same error. username_2, 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?
  
  
  ---
  
  