Lang php Notice
-
PS vz.: 5.7.2
module Vz.: 0.9.13
lang module: polylang
PrestaShopIntegration::psLang() – php NOTICE
$lang is not defined, if defined( ‘ICL_LANGUAGE_CODE’ ) OR function_exists( ‘pll_current_language’ )
Need to be defined before.function psLang() { if ( $this->id_lang ) return $this->id_lang; + $lang = ''; if ( defined( 'ICL_LANGUAGE_CODE' ) ) $iso_code = ICL_LANGUAGE_CODE; elseif ( function_exists( 'pll_current_language' ) ) $iso_code = pll_current_language(); elseif ( $lang = get_bloginfo('language') ) $iso_code = substr( $lang, 0, 2 ); if ( $iso_code ) { if ($this->psdb) { $id_lang = $this->psdb->get_var( ' SELECT <code>id_lang</code> FROM <code>'.$this->psprefix.'lang</code> WHERE <code>active</code> = 1 AND (<code>iso_code</code> = "'.$iso_code.'" OR <code>iso_code</code> = "'.$lang.'")' ); if ( $id_lang > 0 ) return ( $this->id_lang = $id_lang ); } } return ( $this->id_lang = $this->psConfiguration( 'PS_LANG_DEFAULT' ) ); }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Lang php Notice’ is closed to new replies.