我正在开发一个在php版本5.3.29的实时环境中运行的代码库。
我已尝试将其移至使用php版本5.6.28的测试环境。
我注意到loadConfig
方法没有被调用,但如果我用private
关键字声明它。
这是版本5.3和5.6之间的重大变化,其中方法需要声明,私有,公共,受保护等?
这个部分示例类:
class BaseConfig {
var $dao = null;
var $appConfig = array();
var $frameworkBootstrap = null;
var $reserved = array(CMD_PARAM, 'go', 'submit', 'xsubmit');
function BaseConfig() {
register_shutdown_function(array(&$this, '_doShutdown'));
$this->frameworkBootstrap = parse_ini_file(dirname(__FILE__) . '/' . FRAMEWORK_BOOTSTRAP_CONFIG);
$this->loadConfig();
}
function loadConfig() {
require_once(dirname(__FILE__) . '/ConfigDAO.class.php');
$dao = new ConfigDAO();
$this->appConfig = $dao->getAllSettings();
}
}
这些是显示的错误:
Strict Standards: Declaration of SimpleConfig::getInstance() should be compatible with & BaseConfig::getInstance($type = NULL)
Strict Standards: Non-static method SimpleConfig::getInstance() should not be called statically
Strict Standards: Non-static method BaseConfig::getInstance() should not be called statically
Notice: Use of undefined constant CMD_PARAM - assumed 'CMD_PARAM'
Warning: parse_ini_file(www/conf/config.app.settings.ini.php): failed to open stream: No such file or directory
Notice: Constant ADMIN_SAVE_QUANTITY_SHIPPING_CMD already defined
Strict Standards: Non-static method Util::getSelf() should not be called statically
Strict Standards: Non-static method Util::cleanUri() should not be called statically
Strict Standards: Non-static method Util::getProtocol() should not be called statically
Notice: Undefined index: HTTPS
Notice: Undefined index: SCRIPT_URI
Notice: Undefined index: HTTP_X_FORWARDED_HOST
Strict Standards: Non-static method Request::getInstance()
Strict Standards: Declaration of MySQLQueryResult::getRow() should be compatible with QueryResult::getRow($index, $type)
Strict Standards: Declaration of MySQLDatabase::getInstance() should be compatible with Database::getInstance()
Deprecated: Non-static method Util::sanitize() should not be called statically, assuming $this from incompatible context
Deprecated: Non-static method Util::checkArray() should not be called statically, assuming $this from incompatible context
Notice: Only variable references should be returned by reference
Strict Standards: Non-static method Language::getInstance() should not be called statically
Deprecated: Non-static method BootstrapConfig::getInstance() should not be called statically, assuming $this from incompatible context
Deprecated: Non-static method BaseConfig::getInstance() should not be called statically, assuming $this from incompatible context
Warning: parse_ini_file(/var/www/conf/config.app.bootstrap.ini.php): failed to open stream: No such file or directory
Deprecated: Non-static method MySQLDatabase::getInstance() should not be called statically, assuming $this from incompatible context
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead
Deprecated: Non-static method Util::mysql_real_escape_string() should not be called statically, assuming $this from incompatible context
Deprecated: Non-static method Session::getInstance() should not be called statically, assuming $this from incompatible context
Notice: Only variable references should be returned by reference
Deprecated: Non-static method BootstrapConfig::getInstance() should not be called statically, assuming $this from incompatible context
Deprecated: Non-static method BaseConfig::getInstance() should not be called statically, assuming $this from incompatible context
Deprecated: Non-static method MySQLDatabase::getInstance() should not be called statically, assuming $this from incompatible context
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead
Deprecated: Non-static method BootstrapConfig::getInstance() should not be called statically, assuming $this from incompatible context
Deprecated: Non-static method BaseConfig::getInstance() should not be called statically, assuming $this from incompatible context
Deprecated: Non-static method Util::mysql_real_escape_string() should not be called statically, assuming $this from incompatible context
Deprecated: Non-static method BeanMapper::populateBean() should not be called statically, assuming $this from incompatible context
Strict Standards: Declaration of ProductItem::getWeightAmount() should be compatible with Item::getWeightAmount($mult = true)
Strict Standards: Declaration of ProductItem::getSelectedOption() should be compatible with & Item::getSelectedOption()
Notice: Undefined index: digiShopCacheDisabled
Deprecated: Non-static method Util::santizeInput() should not be called statically, assuming $this from incompatible context
Notice: Only variable references should be returned by reference
Notice: Undefined index: xdigiSHOPadminSale
Deprecated: Non-static method Util::santizeInput() should not be called statically, assuming $this from incompatible context
Notice: Only variable references should be returned by reference
Notice: Constant CACHE_DISABLED already defined
Deprecated: Non-static method BaseConfig::getInstance() should not be called statically, assuming $this from incompatible context
Deprecated: Non-static method BaseConfig::getInstance() should not be called statically, assuming $this from incompatible context
Deprecated: Non-static method Session::getInstance() should not be called statically, assuming $this from incompatible context
Deprecated: Non-static method BootstrapConfig::getInstance() should not be called statically, assuming $this from incompatible context
Deprecated: Non-static method BaseConfig::getInstance() should not be called statically, assuming $this from incompatible context
Deprecated: Non-static method BootstrapConfig::getInstance() should not be called statically, assuming $this from incompatible context
Deprecated: Non-static method BaseConfig::getInstance() should not be called statically, assuming $this from incompatible context
Deprecated: Non-static method MySQLDatabase::getInstance() should not be called statically, assuming $this from incompatible context
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead
Deprecated: Non-static method Util::mysql_real_escape_string() should not be called statically, assuming $this from incompatible context
Deprecated: Non-static method BeanMapper::populateBean() should not be called statically, assuming $this from incompatible context
Deprecated: Non-static method Util::sanitize() should not be called statically, assuming $this from incompatible context
Deprecated: Non-static method Util::checkArray() should not be called statically, assuming $this from incompatible context
Notice: Only variable references should be returned by reference
Notice: Undefined index: adminStorefront
Deprecated: Non-static method Util::santizeInput() should not be called statically, assuming $this from incompatible context
Notice: Only variable references should be returned by reference
Deprecated: Non-static method Util::santizeInput() should not be called statically, assuming $this from incompatible context
Notice: Only variable references should be returned by reference
Deprecated: Non-static method Util::sanitize() should not be called statically, assuming $this from incompatible context
Deprecated: Non-static method Util::checkArray() should not be called statically, assuming $this from incompatible context
Notice: Only variable references should be returned by reference
Strict Standards: Non-static method Util::buildURL() should not be called statically
Strict Standards: Non-static method Util::buildURL() should not be called statically
Deprecated: Non-static method Util::sanitize() should not be called statically, assuming $this from incompatible context
Deprecated: Non-static method Util::checkArray() should not be called statically, assuming $this from incompatible context
Notice: Only variable references should be returned by reference
Deprecated: Non-static method Util::sanitize() should not be called statically, assuming $this from incompatible context
Deprecated: Non-static method Util::checkArray() should not be called statically, assuming $this from incompatible context
Notice: Only variable references should be returned by reference
Deprecated: Non-static method Util::sanitize() should not be called statically, assuming $this from incompatible context
Deprecated: Non-static method Util::checkArray() should not be called statically, assuming $this from incompatible context
Notice: Only variable references should be returned by reference
Deprecated: Non-static method Util::sanitize() should not be called statically, assuming $this from incompatible context
Deprecated: Non-static method Util::checkArray() should not be called statically, assuming $this from incompatible context
Notice: Only variable references should be returned by reference
Strict Standards: Non-static method KeywordUtil::getKeywordSessionIdentifier() should not be called statically
Notice: Undefined index: digiSHOPkeywordSessionCookie
Deprecated: Non-static method Util::santizeInput() should not be called statically, assuming $this from incompatible context
Notice: Only variable references should be returned by reference
Notice: Only variable references should be returned by reference
Deprecated: Non-static method Util::sanitize() should not be called statically, assuming $this from incompatible context
Deprecated: Non-static method Util::checkArray() should not be called statically, assuming $this from incompatible context
Notice: Only variable references should be returned by reference
Deprecated: Non-static method Util::sanitize() should not be called statically, assuming $this from incompatible context
Deprecated: Non-static method Util::checkArray() should not be called statically, assuming $this from incompatible context
Notice: Only variable references should be returned by reference
Fatal error: Call-time pass-by-reference has been removed