Skip to content

Instantly share code, notes, and snippets.

Revisions

  1. hgati created this gist Oct 25, 2023.
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    From 2333e0fd5cc0a7f1d30cd2edcf73acd90bba8a63 Mon Sep 17 00:00:00 2001
    From: Dennis <cobays@gmail.com>
    Date: Wed, 25 Oct 2023 14:41:23 +0900
    Subject: [PATCH] Declare class property to fix issue in PHP 8.2

    ---
    Helper/Data.php | 5 +++++
    1 file changed, 5 insertions(+)

    diff --git a/Helper/Data.php b/Helper/Data.php
    index f90bfba..9ad5d7c 100755
    --- a/Helper/Data.php
    +++ b/Helper/Data.php
    @@ -13,6 +13,11 @@ use \Magento\Framework\App\Request\Http;

    class Data extends \Magento\Framework\App\Helper\AbstractHelper
    {
    + /**
    + * @var \Magento\Framework\App\Request\Http
    + */
    + protected $request;
    +
    /**
    * Data constructor.
    * @param Http $request
    --
    2.34.1