View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0005950 | OXID ERP Interface | OXID ERP Interface - sub | public | 2014-11-11 09:08 | 2023-12-13 11:03 |
| Reporter | michael_keiluweit | Assigned To | |||
| Priority | high | Severity | major | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Product Version | 2.14.0 | ||||
| Summary | 0005950: Calling undefined method (4.9.1 / 5.2.1) | ||||
| Description | OXID_ESHOP_PE_4.9.1_SNAPSHOT\oxerpcron.php The calling of the method oxConfig::getInstance()
if (class_exists('oxRegistry')) {
// initializes singleton config class
$myConfig = oxConfig::getInstance();
}
causes the fatal error:
Fatal error: Call to undefined method oxConfig::getInstance() in OXID_ESHOP_PE_4.9.1_SNAPSHOT/oxerpcron.php on line 55
Call Stack:
0.0029 645832 1. {main}() OXID_ESHOP_PE_4.9.1_SNAPSHOT/oxerpcron.php:0
The if query is right in asking if the class oxRegistry is existing, but then it needs to use it, too:
if (class_exists('oxRegistry')) {
// initializes singleton config class
//$myConfig = oxConfig::getInstance(); //the method oxConfig::getInstance() doesn't exist anymore.
$myConfig = oxRegistry::getConfig();
}
| ||||
| Tags | Configuration Options, CSV, ERP, Registry | ||||
|
|
The file is no longer part of the module or the shop, but there is a very recent version of an example cron php script at https://docs.oxid-esales.com/interfaces/erp/en/latest/csv/import/importing-by-cronjob.html (For licensees of the ERP module only, of course) |