I am writing an e-commerce website. When I click on the product, the product page should open but I get the
Blockquote Fatal error: Uncaught Error: Call to a member function get() on null in
The complete error text is:
Fatal error: Uncaught Error: Call to a member function get() on null in /home/kozmeonl/public_html/system/library/vendor/isenselabs/nitropack/core/core.php:63 Stack trace: #0 /home/kozmeonl/public_html/system/library/vendor/isenselabs/nitropack/core/minify_functions.php(105): getWebshopUrl() #1 /home/kozmeonl/public_html/system/library/vendor/isenselabs/nitropack/core/minify_functions.php(171): clean_file_paths(Array, Array) #2 /home/kozmeonl/public_html/system/library/vendor/isenselabs/nitropack/core/minify_functions.php(31): minify('css', Array, Array, Array) #3 /home/kozmeonl/public_html/system/library/vendor/isenselabs/nitropack/include/minify_css.php(9): optimizeCSS(Array) #4 /home/kozmeonl/public_html/vqmod/vqcache/vq2-system_library_document.php(143): nitro_minify_css(Array) #5 /home/kozmeonl/public_html/vqmod/vqcache/vq2-catalog_controller_common_header.php(79): Document->getStyles() #6 /home/kozmeonl/public_html/vqmod/vqcache/vq2-storage_modification_system_engine_action.php(79): ControllerCommonHeader->index(Arr in /home/kozmeonl/public_html/system/library/vendor/isenselabs/nitropack/core/core.php on line 63
Here is codes:
core.php
function getWebshopUrl() {
global $registry;
if (isset($_SERVER['HTTPS']) && (($_SERVER['HTTPS'] == 'on') || ($_SERVER['HTTPS'] == '1'))) {
$webshopUrl = $registry->get('config')->get('config_ssl');
if (!$webshopUrl) {
$webshopUrl = $registry->get('config')->get('config_url');
}
} else {
$webshopUrl = $registry->get('config')->get('config_url');
}
return rtrim(preg_replace('~^https?\:~i', '', $webshopUrl), '/');
minify_functions.php
$webshopUrl = preg_replace('@^(//\w)@', 'http:$1', getWebshopUrl());
Aucun commentaire:
Enregistrer un commentaire