zorn-v / nextcloud-social-login

GNU Affero General Public License v3.0
198 stars 137 forks source link

error after upgrading php from 7.3 to 7.4 or 8.0 #313

Closed tobstone closed 2 years ago

tobstone commented 2 years ago

{ "url": "/apps/sociallogin/custom_oidc/dwbn_sso", "time": "2021-11-24T11:36:56+00:00", "message": "{\"Exception\":\"Exception\",\"Message\":\"preg_match(): Argument #2 ($subject) must be of type string, stdClass given\",\"Code\":0,\"Trace\":[{\"file\":\"/var/www/nextcloud/lib/private/AppFramework/App.php\",\"line\":156,\"function\":\"dispatch\",\"class\":\"OC\\AppFramework\\Http\\Dispatcher\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/Route/Router.php\",\"line\":301,\"function\":\"main\",\"class\":\"OC\\AppFramework\\App\",\"type\":\"::\"},{\"file\":\"/var/www/nextcloud/lib/base.php\",\"line\":1000,\"function\":\"match\",\"class\":\"OC\\Route\\Router\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/index.php\",\"line\":36,\"function\":\"handleRequest\",\"class\":\"OC\",\"type\":\"::\"}],\"File\":\"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php\",\"Line\":158,\"Previous\":{\"Exception\":\"TypeError\",\"Message\":\"preg_match(): Argument #2 ($subject) must be of type string, stdClass given\",\"Code\":0,\"Trace\":[{\"file\":\"/var/www/nextcloud/apps/sociallogin/lib/Provider/CustomOpenIDConnect.php\",\"line\":61,\"function\":\"preg_match\"},{\"file\":\"/var/www/nextcloud/apps/sociallogin/lib/Service/ProviderService.php\",\"line\":330,\"function\":\"getUserProfile\",\"class\":\"OCA\\SocialLogin\\Provider\\CustomOpenIDConnect\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/apps/sociallogin/lib/Service/ProviderService.php\",\"line\":279,\"function\":\"auth\",\"class\":\"OCA\\SocialLogin\\Service\\ProviderService\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/apps/sociallogin/lib/Controller/LoginController.php\",\"line\":41,\"function\":\"handleCustom\",\"class\":\"OCA\\SocialLogin\\Service\\ProviderService\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php\",\"line\":217,\"function\":\"custom\",\"class\":\"OCA\\SocialLogin\\Controller\\LoginController\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php\",\"line\":126,\"function\":\"executeController\",\"class\":\"OC\\AppFramework\\Http\\Dispatcher\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/AppFramework/App.php\",\"line\":156,\"function\":\"dispatch\",\"class\":\"OC\\AppFramework\\Http\\Dispatcher\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/Route/Router.php\",\"line\":301,\"function\":\"main\",\"class\":\"OC\\AppFramework\\App\",\"type\":\"::\"},{\"file\":\"/var/www/nextcloud/lib/base.php\",\"line\":1000,\"function\":\"match\",\"class\":\"OC\\Route\\Router\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/index.php\",\"line\":36,\"function\":\"handleRequest\",\"class\":\"OC\",\"type\":\"::\"}],\"File\":\"/var/www/nextcloud/apps/sociallogin/lib/Provider/CustomOpenIDConnect.php\",\"Line\":61},\"CustomMessage\":\"--\"}", "level": 3, "reqId": "UJKKyEqVxgxiJ9XUgn5p", "remoteAddr": "212.60.218.4", "user": "--", "version": "22.2.0.1", "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:94.0) Gecko/20100101 Firefox/94.0", "app": "index", "method": "GET" }

happens after upgrade to v4.9.3
nextcloud version 21 and 22RC

downgrade to php7.3 fixes the error

zorn-v commented 2 years ago

Fixed in v4.9.4

tobstone commented 2 years ago

thanks for the quick fix, and thx again for this great app