phph 8.2 Error in PushActivitySend.php

Created on 31 January 2024, 11 months ago
Updated 1 February 2024, 11 months ago

FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------
63 | ERROR | "$this" can no longer be used in a plain function or method since PHP 7.1.
--------------------------------------------------------------------------------------------------------------------------

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

🇩🇪Germany slowflyer

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @slowflyer
  • 🇮🇳India dineshkumarbollu

    Hi @slowflyer

    The issue may issue by modifying the code

    From

    if ($container_or_activity instanceof ActivityInterface) {
          if (isset($this)) {
            $this->process($container_or_activity);
          }
          return;
        }
    

    To

    if ($container_or_activity instanceof ActivityInterface) {
        $instance = new static(
          $configuration,
          $plugin_id,
          $plugin_definition,
          $container_or_activity->get('social_pwa.web_push_manager'),
          $container_or_activity->get('config.factory')->get('social_pwa.settings'),
          $container_or_activity->get('logger.factory')->get('activity_send_push')
        );
    
        $instance->process($container_or_activity);
        return;
      }
    
Production build 0.71.5 2024