View Issue Details

IDProjectCategoryView StatusLast Update
0005950OXID ERP InterfaceOXID ERP Interface - subpublic2023-12-13 11:03
Reportermichael_keiluweit Assigned To 
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.14.0 
Summary0005950: Calling undefined method (4.9.1 / 5.2.1)
DescriptionOXID_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();
}
TagsConfiguration Options, CSV, ERP, Registry

Activities

Sven Brunk

2023-12-13 11:03

manager   ~0016069

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)