mpay24/mpay24-php

Compatibility error in PHP 5.4.40

Closed this issue · 2 comments

Hello,
When I create the Mpay24 Object i get an error,

Parse error: syntax error, unexpected '.', expecting ',' or ';' in /var/www/clients/client1/web3/web/devp1_1412/vendor26.06.2018/mpay24/mpay24-php/src/Mpay24Sdk.php on line 107 [4] syntax error, unexpected '.', expecting ',' or ';' on line 107 in file /var/www/clients/client1/web3/web/devp1_1412/vendor26.06.2018/mpay24/mpay24-php/src/Mpay24Sdk.php PHP 5.4.40 (Linux)

The fix is change

  /**
     * @var string
     */
    protected $caInfoPath = __DIR__ .  '/bin/';

    public function __construct(Mpay24Config &$config = null)
    {
        if (is_null($config)) {
            $config = new Mpay24Config();
        }

        $this->config = $config;
    }

to this:

    /**
     * @var string
     */
    protected $caInfoPath;

    public function __construct(Mpay24Config &$config = null)
    {
        if (is_null($config)) {
            $config = new Mpay24Config();
        }

        $this->config = $config;
        $this->caInfoPath = __DIR__ .  '/bin/';
    }

Please fix this and check the code for PHP >= 5.3.3 Compatibility.

Thank you Lukas. I will have a look and fix it.

Just released version 4.3.0 where this is solved.