Fixing problem when creating catalog (PHP version incompatibility)