onesignal
onesignal copied to clipboard
Type Error Unsupported operand types: string * int
Hi, we're using the onesignal v2.5 package and suddenly, we get an error for all notifications being sent using the Onesignal channel saying
Unsupported operand types: string * int
After Upgrading to v2.6 the issue still persists.
+1
@theafolayan did you manage to resolve? Not sure if this is linked:
https://github.com/berkayk/laravel-onesignal/pull/199
@theafolayan Can you share more information, please? It's hard to replicate if we don't know how you're using or where you getting the error from.
So the provider doesn't seem to match the latest version of the berkayk package. See changes:
https://github.com/berkayk/laravel-onesignal/compare/v2.3...v2.4.1
I've updated my fork with the following:
https://github.com/laravel-notification-channels/onesignal/pull/159/files
Which seems to fix the issue?
@ryangittings
Oh, got it! The berkayk package changed the signature for the client class in 2.3, then we changed it back to how it was in 2.4. Probably this is the issue.
same issue
[2025-02-07 17:21:53] local.ERROR: Unsupported operand types: string * int {"exception":"[object] (TypeError(code: 0): Unsupported operand types: string * int at /Users/ss/Documents/projects/lift20/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:506)
So the provider doesn't seem to match the latest version of the berkayk package. See changes:
I've updated my fork with the following:
https://github.com/laravel-notification-channels/onesignal/pull/159/files
Which seems to fix the issue?
The Fix from @ryangittings seems to work for me. Thanks @ryangittings !
Hoping for this to be merge .
Waiting for this fix also.