Topic on Extension talk:PubmedParser

PHP Catchable fatal error

5
Summary by Kghbln

Fixed in version 3.2.x

Kghbln (talkcontribs)

When trying to install the extension and thus creating the database table via "php /maintenance/update.php" I get the following PHP fatal:

PHP Catchable fatal error:  Argument 1 passed to PubmedParser\Extension::createTable() must be an instance of PubmedParser\DatabaseUpdater, instance of MysqlUpdater given in /.../w/extensions/PubmedParser/PubmedParser.Extension.php on line 57

So I created the table manually. Anyway a fix for this will be great.

2602:306:CF46:34E0:80FF:BBCC:B0A2:B7FB (talkcontribs)

I experienced the same problem after upgrading from 1.24.x to 1.26.2. I fixed this by opening PubmedParser.Extension.php, and on line 57 I changed this line:

public static function createTable( DatabaseUpdater $updater ) {

to this:

public static function createTable( \DatabaseUpdater $updater ) {

In case you missed it, the change is to add the "\" in front of DatabaseUpdater.

Cheers,

Dave

Kghbln (talkcontribs)

Thank you for sharing the solution!

Bovender (talkcontribs)

Fixed in version 3.2.x, thanks.

Kghbln (talkcontribs)

Cool! Thank you!