PHP notice in api.php

Forum for all users to discuss the implementation and operation of the ChoralWiki at CPDL
AlexMyltsev
Posts: 12
Joined: 04 Jul 2013 09:33

PHP notice in api.php

Postby AlexMyltsev » 13 Feb 2018 01:28

Hi,

I've tried to use MediaWiki API to edit pages, and this was the response I got for the edit request:

Code: Select all

{"edit":{"result":"Success","pageid":189178,"title":"User:AlexMyltsev/previews split","contentmodel":"wikitext","oldrevid":880001,"newrevid":880002,"newtimestamp":"2018-02-13T01:21:29Z"}}
Notice: Undefined offset: 2 in /home/choralwi/public_html/wiki/extensions/ChoralWiki/EditionDataGrabber.php on line 113


The PHP notice, of course, makes the response non-valid JSON. Can we fix the API?

choralia
Site Admin
Posts: 2591
Joined: 05 Mar 2006 19:57
Location: Rome, Italy
Contact:

Re: PHP notice in api.php

Postby choralia » 13 Feb 2018 16:37

Please try again. It should be fixed now.

Max

AlexMyltsev
Posts: 12
Joined: 04 Jul 2013 09:33

Re: PHP notice in api.php

Postby AlexMyltsev » 14 Feb 2018 15:03

Got another one:

Code: Select all

Warning: Missing argument 12 for EditionDataGrabber() in /home/choralwi/public_html/wiki/extensions/ChoralWiki/EditionDataGrabber.php on line 9

choralia
Site Admin
Posts: 2591
Joined: 05 Mar 2006 19:57
Location: Rome, Italy
Contact:

Re: PHP notice in api.php

Postby choralia » 14 Feb 2018 15:28

This seems more tricky. As a workaround I disabled warnings on this script. Could you please try again?

Max


Return to “Operation and Implementation issues”

Who is online

Users browsing this forum: No registered users and 1 guest