Title: php error when updating posts
Last modified: August 21, 2016

---

# php error when updating posts

 *  [rain01](https://wordpress.org/support/users/rain01/)
 * (@rain01)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/php-error-when-updating-posts/)
 * I get an error when trying to update posts and pages now. Tried to disable all
   other plugins but still the same error.
 * Warning: array_merge() [function.array-merge]: Argument #2 is not an array in/
   place/wp-content/plugins/widget-context/widget-context.php on line 76
 * Argument #2 = $_POST[‘wl’] = NULL
 * [http://wordpress.org/extend/plugins/widget-context/](http://wordpress.org/extend/plugins/widget-context/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [rain01](https://wordpress.org/support/users/rain01/)
 * (@rain01)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/php-error-when-updating-posts/#post-3670645)
 * And it resets the widget settings after any post update.
 *  [wvvw](https://wordpress.org/support/users/wvvw/)
 * (@wvvw)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/php-error-when-updating-posts/#post-3670943)
 * ok, i think i found the solution.
    It is pretty simple: I am just checking is
   POST[wt] is an array
 * so replace 76 line with following
 *     ```
       if (is_array($_POST['wl']))
       $this->context_options = array_merge( $this->context_options, $_POST['wl'] );
       else
       $this->context_options = array_merge( $this->context_options, array($_POST['wl']) );
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘php error when updating posts’ is closed to new replies.

 * ![](https://ps.w.org/widget-context/assets/icon-256x256.png?rev=1919865)
 * [Widget Context](https://wordpress.org/plugins/widget-context/)
 * [Support Threads](https://wordpress.org/support/plugin/widget-context/)
 * [Active Topics](https://wordpress.org/support/plugin/widget-context/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/widget-context/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/widget-context/reviews/)

## Tags

 * [Argument #2](https://wordpress.org/support/topic-tag/argument-2/)

 * 2 replies
 * 2 participants
 * Last reply from: [wvvw](https://wordpress.org/support/users/wvvw/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/php-error-when-updating-posts/#post-3670943)
 * Status: not resolved