Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter shitpoet

    (@shitpoet)

    i discovered that the problem is with mb_strtolower. it is an extension on php7, so it is not installed on my remote dev server.

    it is used in function translierate

    so i can easily solve my problem on dev server, but i do not know about production server yet.

    but what i think is if we do lower the string in the end, why not just make symbol_table be in lower case in the first place? what do you think?

    	public function transliterate( $string ) {
    		// define symbols table
    		$symbol_table = array(
    			'А'	 => 'A', 'Б'	 => 'B', 'В'	 => 'V', 'Г'	 => 'G', 'Д'	 => 'D',
                         [snip]
    		);
    
    		$symbol_table = apply_filters( 'dco_rf_symbol_table', $symbol_table );
    
    		// transliterate
    		$dco_string	 = strtr( $string, $symbol_table );
    		$dco_string	 = preg_replace( "/[^A-Za-z0-9<code></code>
    '_\-\.]/", '-', $dco_string );
    
    		return apply_filters( 'dco_rf_transliterate', mb_strtolower( $dco_string, 'UTF-8' ), $string, $symbol_table );
    	}

    trace:

    Call to undefined function mb_strtolower()
    return apply_filters( 'dco_rf_transliterate', mb_strtolower( $dco_string, 'UTF-8' ), $string, $symbol_table ); 
    Backtrace from Exception
    In /var/www/bv-store/wp/wp-content/plugins/dco-russian-fixes/class.dco-russian-fixes-base.php [line 65]:
    
    /var/www/bv-store/wp/wp-includes/class-wp-hook.php [line 288] calling transliterate()
    /var/www/bv-store/wp/wp-includes/plugin.php [line 203] calling apply_filters()
    /var/www/bv-store/wp/wp-includes/formatting.php [line 1945] calling apply_filters()
    /var/www/bv-store/wp/wp-admin/includes/menu.php [line 60] calling sanitize_title()
    /var/www/bv-store/wp/wp-admin/menu.php [line 286] calling require_once()
    /var/www/bv-store/wp/wp-admin/admin.php [line 140] calling require()
    /var/www/bv-store/wp/wp-admin/options-general.php [line 10] calling require_once()
    • This reply was modified 7 years ago by shitpoet.
    • This reply was modified 7 years ago by shitpoet.
Viewing 1 replies (of 1 total)