Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-3768

session_set_save_handler error when visiting an affiliate link

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.11.0-b1
    • Fix Version/s: 4.11.0
    • Component/s: Client Interface
    • Labels:
      None

      Description

      When visiting an affiliate link for a client, the following error is produced:

      Something went wrong.
      session_set_save_handler(): Cannot change save handler when session is active on line 43 in /home/blestacp/public_html/vendors/minphp/session/src/Session.php

      Printing Stack Trace:
      #0 [internal function]: UnknownException::setErrorHandler(2, 'session_set_sav...', '/home/blestacp/...', 43, Array)
      #1 /home/blestacp/public_html/vendors/monolog/monolog/src/Monolog/ErrorHandler.php(172): call_user_func(Array, 2, 'session_set_sav...', '/home/blestacp/...', 43, Array)
      #2 [internal function]: Monolog\ErrorHandler->handleError(2, 'session_set_sav...', '/home/blestacp/...', 43, Array)
      #3 /home/blestacp/public_html/vendors/minphp/session/src/Session.php(43): session_set_save_handler(Object(Minphp\Session\Handlers\NativeHandler), false)
      #4 /home/blestacp/public_html/plugins/order/order_controller.php(91): Minphp\Session\Session->__construct()
      #5 /home/blestacp/public_html/plugins/order/controllers/forms.php(82): OrderController->setAffiliateCode('MQ==')
      #6 /home/blestacp/public_html/vendors/minphp/bridge/src/Lib/Dispatcher.php(142): Forms->a()
      #7 /home/blestacp/public_html/index.php(21): Dispatcher::dispatch('/order/forms/a/...')
      #8

      {main}

        Activity

        Hide
        admin Paul Phillips added a comment - - edited

        Appears to happen on PHP 7.2 and PHP 7.3, but not 7.1

        Show
        admin Paul Phillips added a comment - - edited Appears to happen on PHP 7.2 and PHP 7.3, but not 7.1
        Hide
        jonathan Jonathan Reissmueller added a comment -

        Looks like the problem is in OrderController::setAffiliate code. It might work to change

                $this->Session = new Session();
        

        To

                if (!isset($this->Session)) {
                    $this->Session = new Session();
                }
        
        Show
        jonathan Jonathan Reissmueller added a comment - Looks like the problem is in OrderController::setAffiliate code. It might work to change $ this ->Session = new Session(); To if (!isset($ this ->Session)) { $ this ->Session = new Session(); }

          People

          • Assignee:
            jonathan Jonathan Reissmueller
            Reporter:
            admin Paul Phillips
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              29/Jul/20

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 1 hour, 43 minutes
              1h 43m

                Agile