diff options
author | Andreas Gohr <andi@splitbrain.org> | 2021-11-11 13:42:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-11 13:42:22 +0100 |
commit | 0344984cf110904e11b58dfd66a858e924ddbd63 (patch) | |
tree | 6d2ac2de91864996c7f234ccc381d43b27aab0b0 | |
parent | 0b63e09a6f6e45247d064792d2ff494cbec46979 (diff) | |
parent | 852992b4f75ee253d8b82f5b6b9cdf92c7c68bf7 (diff) | |
download | dokuwiki-0344984cf110904e11b58dfd66a858e924ddbd63.tar.gz dokuwiki-0344984cf110904e11b58dfd66a858e924ddbd63.zip |
Merge pull request #3536 from syntaxseed/fix-php-73-compatibility-part1
Fix PHP 7.3 compatibility issues
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | _test/core/phpQuery-onefile.php | 12 | ||||
-rw-r--r-- | _test/tests/inc/XmlRpcServer.test.php | 2 | ||||
-rw-r--r-- | _test/tests/inc/auth_loadacl.test.php | 2 | ||||
-rw-r--r-- | _test/tests/inc/common_mediainfo.test.php | 12 | ||||
-rw-r--r-- | _test/tests/inc/indexer_indexing.test.php | 2 | ||||
-rw-r--r-- | _test/tests/inc/media_searchlist.test.php | 2 | ||||
-rw-r--r-- | _test/tests/inc/parser/parser_code.test.php | 1 | ||||
-rw-r--r-- | _test/tests/inc/parser/parser_file.test.php | 1 | ||||
-rw-r--r-- | _test/tests/inc/parser/parser_footnote.test.php | 1 | ||||
-rw-r--r-- | _test/tests/inc/parser/parser_quotes.test.php | 1 | ||||
-rw-r--r-- | _test/tests/inc/remote.test.php | 2 | ||||
-rw-r--r-- | _test/tests/inc/sort_without_collator.test.php | 2 | ||||
-rw-r--r-- | _test/tests/lib/exe/fetch_imagetoken.test.php | 6 | ||||
-rw-r--r-- | inc/Remote/Api.php | 2 | ||||
-rw-r--r-- | inc/Remote/ApiCore.php | 2 |
16 files changed, 24 insertions, 28 deletions
diff --git a/.gitignore b/.gitignore index bc00b7f20..84fa10253 100644 --- a/.gitignore +++ b/.gitignore @@ -95,5 +95,5 @@ vendor/splitbrain/php-cli/apigen.neon # PHPUnit tests phpunit.phar -.phpunit.result.cache +*.phpunit.result.cache _test/data/ diff --git a/_test/core/phpQuery-onefile.php b/_test/core/phpQuery-onefile.php index 96083f9c2..13d0649c6 100644 --- a/_test/core/phpQuery-onefile.php +++ b/_test/core/phpQuery-onefile.php @@ -2230,7 +2230,7 @@ class phpQueryObject /** * @access private */ - protected function __pseudoClassParam($paramsString) { + protected function pseudoClassParam($paramsString) { // TODO; } /** @@ -2456,7 +2456,7 @@ class phpQueryObject 'type' => $data ? 'POST' : 'GET', 'data' => $data, 'complete' => $callback, - 'success' => array($this, '__loadSuccess') + 'success' => array($this, 'loadSuccess') ); phpQuery::ajax($ajax); return $this; @@ -2466,7 +2466,7 @@ class phpQueryObject * @param $html * @return unknown_type */ - public function __loadSuccess($html) { + public function loadSuccess($html) { if ($this->_loadSelector) { $html = phpQuery::newDocument($html)->find($this->_loadSelector); unset($this->_loadSelector); @@ -4267,21 +4267,21 @@ class phpQueryObject $debug = phpQuery::$debug; phpQuery::$debug = false; foreach($this->stack() as $node) - $output .= $this->__dumpTree($node); + $output .= $this->dumpTreeInternal($node); phpQuery::$debug = $debug; print $html ? nl2br(str_replace(' ', ' ', $output)) : $output; return $this; } - private function __dumpTree($node, $intend = 0) { + private function dumpTreeInternal($node, $intend = 0) { $whois = $this->whois($node); $return = ''; if ($whois) $return .= str_repeat(' - ', $intend).$whois."\n"; if (isset($node->childNodes)) foreach($node->childNodes as $chNode) - $return .= $this->__dumpTree($chNode, $intend+1); + $return .= $this->dumpTreeInternal($chNode, $intend+1); return $return; } /** diff --git a/_test/tests/inc/XmlRpcServer.test.php b/_test/tests/inc/XmlRpcServer.test.php index 6d5dffc76..05d8ca397 100644 --- a/_test/tests/inc/XmlRpcServer.test.php +++ b/_test/tests/inc/XmlRpcServer.test.php @@ -39,7 +39,7 @@ class XmlRpcServerTest extends DokuWikiTest <?xml version="1.0"?> <methodCall> <methodName>wiki.getPageInfo</methodName> - <param> + <param> <value> <string>$pageName</string> </value> diff --git a/_test/tests/inc/auth_loadacl.test.php b/_test/tests/inc/auth_loadacl.test.php index 7fae2e90e..a44d9b4a7 100644 --- a/_test/tests/inc/auth_loadacl.test.php +++ b/_test/tests/inc/auth_loadacl.test.php @@ -93,7 +93,7 @@ ACL; // FS#2867, '\s' in php regular expressions may match non-space characters utf8 strings // this is due to locale setting on the server, which may match bytes '\xA0' and '\x85' // these two bytes are present in valid multi-byte UTF-8 characters. - // this test will use one, 'ठ' (DEVANAGARI LETTER TTHA, e0 a4 a0). There are many others. + // this test will use one, 'ठ' (DEVANAGARI LETTER TTHA, e0 a4 a0). There are many others. function test_FS2867() { global $USERINFO; diff --git a/_test/tests/inc/common_mediainfo.test.php b/_test/tests/inc/common_mediainfo.test.php index 685a36be9..5127d1a7a 100644 --- a/_test/tests/inc/common_mediainfo.test.php +++ b/_test/tests/inc/common_mediainfo.test.php @@ -5,7 +5,7 @@ class common_basicinfo_test extends DokuWikiTest { function setup() : void { parent::setup(); - global $USERINFO; + global $USERINFO; $USERINFO = array( 'pass' => '179ad45c6ce2cb97cf1029e212046e81', 'name' => 'Arthur Dent', @@ -15,7 +15,7 @@ class common_basicinfo_test extends DokuWikiTest { $_SERVER['REMOTE_USER'] = 'testuser'; $_SERVER['REMOTE_ADDR'] = '1.2.3.4'; } - + function _get_info() { global $USERINFO; $info = array ( @@ -27,10 +27,10 @@ class common_basicinfo_test extends DokuWikiTest { 'ismobile' => false, 'client' => 'testuser', ); - + return $info; } - + /** * We're interested in the extra keys for $INFO when its a media request */ @@ -38,10 +38,10 @@ class common_basicinfo_test extends DokuWikiTest { global $NS, $IMG; $NS = ''; $IMG = 'testimage.png'; - + $info = $this->_get_info(); $info['image'] = 'testimage.png'; - + $this->assertEquals(mediainfo(),$info); } } diff --git a/_test/tests/inc/indexer_indexing.test.php b/_test/tests/inc/indexer_indexing.test.php index 8c28cfb63..ce1ed5e5e 100644 --- a/_test/tests/inc/indexer_indexing.test.php +++ b/_test/tests/inc/indexer_indexing.test.php @@ -76,4 +76,4 @@ class indexer_indexing_test extends DokuWikiTest { sort($result); $this->assertEquals(array('0'), $result); } -}
\ No newline at end of file +} diff --git a/_test/tests/inc/media_searchlist.test.php b/_test/tests/inc/media_searchlist.test.php index 234c2f521..2163aa196 100644 --- a/_test/tests/inc/media_searchlist.test.php +++ b/_test/tests/inc/media_searchlist.test.php @@ -28,7 +28,7 @@ class media_searchlist_test extends DokuWikiTest function setUp() : void { parent::setUp(); - + //create some files to search $png = mediaFN('wiki:kind_zu_katze.png'); $ogv = mediaFN('wiki:kind_zu_katze.ogv'); diff --git a/_test/tests/inc/parser/parser_code.test.php b/_test/tests/inc/parser/parser_code.test.php index c700ed10a..bcb5a86f8 100644 --- a/_test/tests/inc/parser/parser_code.test.php +++ b/_test/tests/inc/parser/parser_code.test.php @@ -353,4 +353,3 @@ class TestOfDoku_Parser_Code extends TestOfDoku_Parser { } } - diff --git a/_test/tests/inc/parser/parser_file.test.php b/_test/tests/inc/parser/parser_file.test.php index 23aa8ef5b..11417eb26 100644 --- a/_test/tests/inc/parser/parser_file.test.php +++ b/_test/tests/inc/parser/parser_file.test.php @@ -56,4 +56,3 @@ class TestOfDoku_Parser_File extends TestOfDoku_Parser { } } - diff --git a/_test/tests/inc/parser/parser_footnote.test.php b/_test/tests/inc/parser/parser_footnote.test.php index d7b78cb64..d2c9b11a8 100644 --- a/_test/tests/inc/parser/parser_footnote.test.php +++ b/_test/tests/inc/parser/parser_footnote.test.php @@ -398,4 +398,3 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } } - diff --git a/_test/tests/inc/parser/parser_quotes.test.php b/_test/tests/inc/parser/parser_quotes.test.php index 73291c201..601cd37f0 100644 --- a/_test/tests/inc/parser/parser_quotes.test.php +++ b/_test/tests/inc/parser/parser_quotes.test.php @@ -359,4 +359,3 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { } } - diff --git a/_test/tests/inc/remote.test.php b/_test/tests/inc/remote.test.php index efe18d7ef..39d3c62a1 100644 --- a/_test/tests/inc/remote.test.php +++ b/_test/tests/inc/remote.test.php @@ -7,7 +7,7 @@ use dokuwiki\Remote\RemoteException; class RemoteAPICoreTest { - function __getRemoteInfo() { + function getRemoteInfo() { return array( 'wiki.stringTestMethod' => array( 'args' => array(), diff --git a/_test/tests/inc/sort_without_collator.test.php b/_test/tests/inc/sort_without_collator.test.php index f882a67e8..8451a3f4d 100644 --- a/_test/tests/inc/sort_without_collator.test.php +++ b/_test/tests/inc/sort_without_collator.test.php @@ -108,7 +108,7 @@ class sort_without_collator_test extends sort_with_collator_test /** * Provide WRONG sorted sequences of all characters used in the languages * being tested, as the fallback sort simply follows character codes. - * + * * The sorted sequences given in class "sort_with_collator" are simply * reordered here, starting with A-Z and continuing with accented characters * ordered by character codes. diff --git a/_test/tests/lib/exe/fetch_imagetoken.test.php b/_test/tests/lib/exe/fetch_imagetoken.test.php index c3371ca71..5360fec3f 100644 --- a/_test/tests/lib/exe/fetch_imagetoken.test.php +++ b/_test/tests/lib/exe/fetch_imagetoken.test.php @@ -51,11 +51,11 @@ class fetch_imagetoken_test extends DokuWikiTest { $response = $this->fetchResponse($valid_token); $this->assertTrue((bool)$response->getHeader('Content-Type')); $this->assertTrue((bool)($response->getContent())); - + $status_code = $response->getStatusCode(); $this->assertTrue(is_null($status_code) || (200 == $status_code)); } - + /** * modified image request with invalid token * expect: 412 status code @@ -64,7 +64,7 @@ class fetch_imagetoken_test extends DokuWikiTest { $invalid_token = 'tok='.media_get_token('junk',200,100).'&'; $this->assertEquals(412,$this->fetchResponse($invalid_token)->getStatusCode()); } - + /** * modified image request with no token * expect: 412 status code diff --git a/inc/Remote/Api.php b/inc/Remote/Api.php index 749c2e6ea..0b406355c 100644 --- a/inc/Remote/Api.php +++ b/inc/Remote/Api.php @@ -344,7 +344,7 @@ class Api $this->coreMethods = $apiCore; } } - return $this->coreMethods->__getRemoteInfo(); + return $this->coreMethods->getRemoteInfo(); } /** diff --git a/inc/Remote/ApiCore.php b/inc/Remote/ApiCore.php index c3275890e..b69080880 100644 --- a/inc/Remote/ApiCore.php +++ b/inc/Remote/ApiCore.php @@ -36,7 +36,7 @@ class ApiCore * * @return array */ - public function __getRemoteInfo() + public function getRemoteInfo() { return array( 'dokuwiki.getVersion' => array( |