BobRay / UpgradeMODX

A dashboard widget that detects upgrades and (optionally) installs them from within the MODX Manager
https://bobsguides.com/upgrade-modx-package.html
22 stars 14 forks source link

Fatal error when Guzzle7 extra is installed #80

Closed verstratenbram closed 1 year ago

verstratenbram commented 1 year ago

Error caused by the UpgradeMODX dashboard widget:

PHP Fatal error:  Uncaught Error: Call to undefined method GuzzleHttp\Psr7\Utils::tryGetContents() in /var/web/public_html/core/components/upgrademodx/vendor/guzzlehttp/psr7/src/Stream.php:103
Stack trace:
#0 /var/web/public_html/core/components/upgrademodx/vendor/guzzlehttp/psr7/src/Stream.php(83): GuzzleHttp\Psr7\Stream->getContents()
#1 [internal function]: GuzzleHttp\Psr7\Stream->__toString()
#2 /var/web/public_html/core/components/upgrademodx/model/upgrademodx/upgrademodx.class.php(771): preg_match('/name":\\s*"v(2\\...', Object(GuzzleHttp\Psr7\Stream), NULL)
#3 /var/web/public_html/core/components/upgrademodx/model/upgrademodx/upgrademodx.class.php(806): UpgradeMODX->setLatestVersion(Object(GuzzleHttp\Psr7\Stream), '1')
#4 /var/web/public_html/core/cache/includes/elements/modsnippet/21.include.cache.php(99): UpgradeMODX->upgradeAvailable('2.8.4-pl')
#5 /var/web/public_html/core/model/modx/modscript.class.php(76): include('/var/web/...')
#6 /var/web/public_html in /var/web/public_html/core/components/upgrademodx/vendor/guzzlehttp/psr7/src/Stream.php on line 103

Modx version: 2.8.4-pl UpgradeMODX version: 2.3.3-pl Guzzle7 version: 7.3.1-pl

BobRay commented 1 year ago

Have you let Mark-H, the author of the Guzzle7 extras know about this?

I think it may be because the Guzzle 7 extra's version is slightly out-of-date (and has reported security issues).

The UGM of Guzzle is version is 7.4.5.

verstratenbram commented 1 year ago

After reinstalling Guzzle7 (this also updates the composer packages) the issue is resolved.