Topic on Extension talk:RottenLinks

updateExternalLinks crashes with PHP 7.4

3
Summary by 2003:C2:3F1C:100:7953:B277:8DAD:D503

Not reproducable.

2003:C2:3F22:8200:ECC6:76B0:8D2F:F64E (talkcontribs)

We have updated to MW 1.35.4 recently, additionally we switched to PHP 7.4.24.


When running with PHP 7.4, the script begins checking external links and after some thousand or more it crashes:


InvalidArgumentException from line 152 of /var/www/test/mediawiki/vendor/guzzlehttp/psr7/src/Response.php: Status code must be an integer value between 1xx and 5xx.

#0 /var/www/test/mediawiki/vendor/guzzlehttp/psr7/src/Response.php(99): GuzzleHttp\Psr7\Response->assertStatusCodeRange()

#1 /var/www/test/mediawiki/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php(115): GuzzleHttp\Psr7\Response->__construct()

#2 /var/www/test/mediawiki/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php(50): GuzzleHttp\Handler\StreamHandler->createResponse()

#3 /var/www/test/mediawiki/vendor/guzzlehttp/guzzle/src/Middleware.php(233): GuzzleHttp\Handler\StreamHandler->__invoke()

#4 /var/www/test/mediawiki/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php(37): GuzzleHttp\Middleware::GuzzleHttp\{closure}()

#5 /var/www/test/mediawiki/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php(54): GuzzleHttp\PrepareBodyMiddleware->__invoke()

#6 /var/www/test/mediawiki/vendor/guzzlehttp/guzzle/src/Middleware.php(57): GuzzleHttp\RedirectMiddleware->__invoke()

#7 /var/www/test/mediawiki/vendor/guzzlehttp/guzzle/src/HandlerStack.php(71): GuzzleHttp\Middleware::GuzzleHttp\{closure}()

#8 /var/www/test/mediawiki/vendor/guzzlehttp/guzzle/src/Client.php(351): GuzzleHttp\HandlerStack->__invoke()

#9 /var/www/test/mediawiki/vendor/guzzlehttp/guzzle/src/Client.php(112): GuzzleHttp\Client->transfer()

#10 /var/www/test/mediawiki/vendor/guzzlehttp/guzzle/src/Client.php(129): GuzzleHttp\Client->sendAsync()

#11 /var/www/test/mediawiki/includes/http/GuzzleHttpRequest.php(204): GuzzleHttp\Client->send()

#12 /var/www/test/mediawiki/includes/libs/http/MultiHttpClient.php(500): GuzzleHttpRequest->execute()

#13 /var/www/test/mediawiki/includes/libs/http/MultiHttpClient.php(191): MultiHttpClient->runMultiHttp()

#14 /var/www/test/mediawiki/includes/libs/http/MultiHttpClient.php(145): MultiHttpClient->runMulti()

#15 /var/www/test/mediawiki/extensions/RottenLinks/includes/RottenLinks.php(25): MultiHttpClient->run()

#16 /var/www/test/mediawiki/extensions/RottenLinks/maintenance/updateExternalLinks.php(57): RottenLinks::getResponse()

#17 /var/www/test/mediawiki/maintenance/doMaintenance.php(107): UpdateExternalLinks->execute()

#18 /var/www/test/mediawiki/extensions/RottenLinks/maintenance/updateExternalLinks.php(83): require_once('/var/www/test/m...')

#19 {main}

2003:C2:3F1C:100:7953:B277:8DAD:D503 (talkcontribs)

Not reproducable. Don't know why but now the script completes without error.

Stefahn (talkcontribs)

Using the same setup I run into the same error:

InvalidArgumentException from line 152 of /html/secret-wiki-neu/mediawiki/vendor/guzzlehttp/psr7/src/Response.php: Status code must be an integer value between 1xx and 5xx. 

#0 /html/secret-wiki-neu/mediawiki/vendor/guzzlehttp/psr7/src/Response.php(99): GuzzleHttp\Psr7\Response->assertStatusCodeRange(999)

I tried to fix the Guzzle thing with this fix, but no luck...

Using RottenLinks version 925f40d.

Reply to "updateExternalLinks crashes with PHP 7.4"