File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -79,8 +79,8 @@ public static function newFromPage( $url ) {
7979 $ tempClient = new Client ( array ( 'headers ' => array ( 'User-Agent ' => 'addwiki-mediawiki-client ' ) ) );
8080 $ pageXml = new SimpleXMLElement ( $ tempClient ->get ( $ url )->getBody () );
8181 $ rsdElement = $ pageXml ->xpath ( 'head/link[@type="application/rsd+xml"][@href] ' );
82- $ rsdXml = new SimpleXMLElement ( $ tempClient ->get ( $ rsdElement [0 ]->attributes ()['href ' ] )->getBody () );
83- return self ::newFromApiEndpoint ( $ rsdXml ->service ->apis ->api ->attributes ()->apiLink -> __toString () );
82+ $ rsdXml = new SimpleXMLElement ( $ tempClient ->get ( ( string ) $ rsdElement [0 ]->attributes ()['href ' ] )->getBody () );
83+ return self ::newFromApiEndpoint ( ( string ) $ rsdXml ->service ->apis ->api ->attributes ()->apiLink );
8484 }
8585
8686 /**
You can’t perform that action at this time.
0 commit comments