Error updating programmatically a plugin's setting I want to update programatically a plugin's setting:

public function init()
{   
     craft()-&gt;on('commerce_orders.onBeforeOrderComplete', function($event){
        // Set InvoiceNumber
        $newInvoiceNumber = $this-&gt;getSettings()-&gt;currentInvoiceNumber + 1;
        $myPlugin = craft()-&gt;plugins-&gt;getPlugin( 'Ultraschall' );
        craft()-&gt;plugins-&gt;savePluginSettings( $myPlugin, 
                                              array('currentInvoiceNumber', $newInvoiceNumber ));
    });
}


But I get this error:

PHP warning
array_key_exists() expects parameter 2 to be array, null given
/mnt/web209/c2/98/5363898/htdocs/dev.ultraschall-leinwand.de/craft/app/models/BaseModel.php(418)

417  // Is this the first time this extra attribute has been set?
418  else if (!array_key_exists($name, $this-&gt;_extraAttributeNames))
419  {
420     $this-&gt;_extraAttributeNames[] = $name;
421  }
422 
423  $this-&gt;_attributes[$name] = $value;
424  return true;


I have added defineSettings() and getSettingsHtml() to the Plugin and can change values via CP without problems.

Why do I get this error?
I made a simple mistake by defining the array with the setting value.
I wrote array('currentInvoiceNumber', $newInvoiceNumber) instead of array('currentInvoiceNumber' =&gt; $newInvoiceNumber).