Skip to content

Commit

Permalink
Fix deprecated functionality: class_exists(): passing null to parameter
Browse files Browse the repository at this point in the history
#1 ($class) of type string is deprecated
  • Loading branch information
luigifab committed Oct 14, 2021
1 parent f25c406 commit c1a5664
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/code/core/Mage/Core/Model/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,7 @@ public function getModelClassName($modelClass)
public function getModelInstance($modelClass = '', $constructArguments = array())
{
$className = $this->getModelClassName($modelClass);
if (class_exists($className)) {
if (!empty($className) && class_exists($className)) {
Varien_Profiler::start('CORE::create_object_of::'.$className);
$obj = new $className($constructArguments);
Varien_Profiler::stop('CORE::create_object_of::'.$className);
Expand Down

0 comments on commit c1a5664

Please sign in to comment.