• 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://ww.wp.xz.cn/extend/plugins/widget-context/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter rain01

    (@rain01)

    And it resets the widget settings after any post update.

    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.