Skip to content

Instantly share code, notes, and snippets.

@proudcommerce
proudcommerce / OXID eShop - getLogger fix OXID 6.2
Created May 26, 2020 13:14
Fix for OXID 6.2 circular reference service problems
# thx to alfred (https://github.com/alfredbez) for sharing
# add to modules/functions.php
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
use OxidEsales\EshopCommunity\Internal\Container\ContainerFactory;
use Psr\Log\LoggerInterface;
use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
function getLogger() {
@dajoho
dajoho / gn2 oxid autoload shim
Last active August 29, 2015 14:06
Prevents OXID throwing a whitepage/redirect if a module exists in the database (aModules) that doesn't exist in the filesystem.
<?php
/* Put this in modules/functions.php */
require_once __DIR__.'/../core/oxfunctions.php';
function gn2_autoload_shim($class) { (substr($class, -7) == "_parent") ? eval('class '.$class.' {}') : ""; }
spl_autoload_register('gn2_autoload_shim');
?>