Skip to content

Fix errors in exception log files for send friend feature for WebAPI tests #34864

Closed
@andrewbess

Description

@andrewbess

Description (*)

Currently we have a problem for send friend feature when WebAPI tests are run on PHP 8.1
An error with trace provided below

main.ERROR: /var/www/html/lib/internal/Magento/Framework/DataObject.php:131 strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated Trace:
handler:Magento\Framework\App\ErrorHandler
/var/www/html/lib/internal/Magento/Framework/DataObject.php:131
/var/www/html/lib/internal/Magento/Framework/Model/AbstractExtensibleModel.php:289
/var/www/html/generated/code/Magento/Catalog/Model/Product/Interceptor.php:1562
/var/www/html/app/code/Magento/Catalog/Helper/Image.php:504
/var/www/html/app/code/Magento/Catalog/Helper/Image.php:472
/var/www/html/app/code/Magento/Catalog/Helper/Image.php:539
/var/www/html/app/code/Magento/SendFriend/Model/SendFriend.php:226
/var/www/html/app/code/Magento/SendFriendGraphQl/Model/SendFriend/SendEmail.php:104
/var/www/html/app/code/Magento/SendFriendGraphQl/Model/Resolver/SendEmailToFriend.php:68
/var/www/html/lib/internal/Magento/Framework/Interception/Interceptor.php:58
/var/www/html/lib/internal/Magento/Framework/Interception/Interceptor.php:138
/var/www/html/lib/internal/Magento/Framework/Interception/Interceptor.php:153
/var/www/html/generated/code/Magento/SendFriendGraphQl/Model/Resolver/SendEmailToFriend/Interceptor.php:23
/var/www/html/lib/internal/Magento/Framework/GraphQl/Query/Resolver/PromiseFactory.php:63
/var/www/html/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php:623
/var/www/html/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php:550
/var/www/html/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php:474
/var/www/html/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php:857
GraphQL\Executor\{closure}:GraphQL\Executor\ReferenceExecutor
/var/www/html/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php:859
/var/www/html/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php:490
/var/www/html/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php:263
/var/www/html/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php:215
/var/www/html/vendor/webonyx/graphql-php/src/Executor/Executor.php:156
/var/www/html/vendor/webonyx/graphql-php/src/GraphQL.php:162
/var/www/html/vendor/webonyx/graphql-php/src/GraphQL.php:94
/var/www/html/lib/internal/Magento/Framework/GraphQl/Query/QueryProcessor.php:78
/var/www/html/app/code/Magento/GraphQl/Controller/GraphQl.php:181
/var/www/html/lib/internal/Magento/Framework/Interception/Interceptor.php:58
/var/www/html/lib/internal/Magento/Framework/Interception/Interceptor.php:138
/var/www/html/app/code/Magento/PageCache/Model/App/FrontController/BuiltinPlugin.php:71
/var/www/html/lib/internal/Magento/Framework/Interception/Interceptor.php:135
/var/www/html/lib/internal/Magento/Framework/Interception/Interceptor.php:153
/var/www/html/generated/code/Magento/GraphQl/Controller/GraphQl/Interceptor.php:23
/var/www/html/lib/internal/Magento/Framework/App/Http.php:116
/var/www/html/generated/code/Magento/Framework/App/Http/Interceptor.php:23
/var/www/html/lib/internal/Magento/Framework/App/Bootstrap.php:264
/var/www/html/pub/index.php:30
{"exception":true} []

The problem is related to new deprecations in PHP 8.1.

We need to research and fix the problem.

Expected result (*)

  1. An exception.log files don't contain provided error

Actual result (*)

  1. An exception.log files contain provided error

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions