CMS MADE SIMPLE FORGE

CMS Made Simple Core

 

[#12477] class.cms_config

avatar
Created By: Brian O'Kelly (BrianO)
Date Submitted: Wed Sep 22 00:05:30 -0400 2021

Assigned To:
Version: 2.1.5
CMSMS Version: 2.1.5
Severity: Major
Resolution: Invalid
State: Closed
Summary:
class.cms_config
Detailed Description:
My hosting company has told me line 50 of this is causing my site to appear as
not secure despite having installed a security certificate.

I posted it to the forum and was advised to post it here.

Can I remove line 50 without creating any problems?


<?php

class cms_config implements ArrayAccess
{
  private static $_instance;
  private $_data = array();

  // this is a singleton.
  private function __construct()  {}

  private function load_config()
  {
    $this->_data = cms_config_load(true);

    // Hack for changed directory and no way to upgrade config.php
$this->_data['previews_path'] = str_replace('smarty/cms', 'tmp',
$this->_data['previews_path']);
  }

  public static function get_instance()
  {
    if (!isset(self::$_instance)) {
      $c = __CLASS__;
      self::$_instance = new $c;

      // now load the config
      self::$_instance->load_config();
    }

    return self::$_instance;
  }

  public function offsetExists($key)
  {
    return isset($this->_data[$key]);
  }

  public function offsetGet($key)
  {
    if( !isset($this->_data[$key]) )
      {
	if( $this->_data['debug'] == true )
trigger_error('Modification of config variables is deprecated',E_USER_ERROR);
	return;
      }
    return $this->_data[$key];
  }

  public function offsetSet($key,$value)
  {
trigger_error('Modification of config variables is
deprecated',E_USER_ERROR);
    $this->_data[$key] = $value;
  }

  public function offsetUnset($key)
  {
trigger_error('Unsetting config variable '.$key.' is invalid',E_USER_ERROR);
  }

} // end of class

?>


History

Comments
avatar
Date: 2021-09-22 00:37
Posted By: Matt Hornsby (DIGI3) (DIGI3)

We can't test or provide fixes for a version over 5 years old. Please test on
the latest version and provide steps and server configuration required to
reproduce.
      
Updates

Updated: 2024-05-06 10:57
state: Open => Closed

Updated: 2021-12-11 11:29
resolution_id: 10 => 9

Updated: 2021-10-18 14:40
resolution_id: 5 => 10

Updated: 2021-09-22 00:37
resolution_id: => 5