Topic on Talk:Wikibase/Installation/Advanced configuration

Error in dispatchChanges.php

1
Lwangaman (talkcontribs)

On my first attempt at using the dispatchChanges.php script, I got the following error message:

Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in /pathtomywiki/w/extensions/Wikibase/lib/includes/SettingsArray.php on line 59

I changed line 59 from:

58    public function getSetting( $settingName ) {

59        if ( !$this->offsetExists( $settingName ) && !array_key_exists( $settingName, $this ) ) {

60            throw new OutOfBoundsException( 'Attempt to get non-existing setting "' . $settingName . '"' );

61        }

to:

58    public function getSetting( $settingName ) {

59        if ( !$this->offsetExists( $settingName ) && !property_exists( $this, $settingName ) ) {

60            throw new OutOfBoundsException( 'Attempt to get non-existing setting "' . $settingName . '"' );

61        }

Now I'm getting this error:


OutOfBoundsException from line 60 of /pathtomywiki/w/extensions/Wikibase/lib/includes/SettingsArray.php: Attempt to get non-existing setting "repoDatabase"


I have repoDatabase defined in WikibaseClient.example.php which I have updated with my repo values:


   $wgWBClientSettings['repositories'] = [

       '' => [

           'repoDatabase' => 'myrepodatabase',

           'baseUri' => $wgWBClientSettings['repoUrl'] . '/entity',

           'entityNamespaces' => [

               'item' => WB_REPO_NS_ITEM,

               'property' => WB_REPO_NS_PROPERTY

           ],

           'prefixMapping' => [ '' => '' ],

       ]

   ];


Perhaps this script is not meant to be run manually from the command line? I'm guessing it's run automatically from the client, where the repoDatabase value is defined?

Reply to "Error in dispatchChanges.php"