Support » Fixing WordPress » Default WordPress plugin FATAL ERROR

  • Resolved Slllobodan

    (@slllobodan)


    i have new install of WP for Serbian language from sr.wordpress.org and default plugin which comes with it srlatin.php has produced fatal error on line 122 using php 7.1.

    This plugin comes as a default install from WordPress and has not been updated a long time. It has deprecated functions and author is not responding, unfortunately i dont know php enough to correct this but i really need this plugin as there is no good alternatives for it,so im hoping someone can help.

    PHP 5.6 – DEPRECATED on line 122
    PHP 7.1 – FATAL ERROR on line 122

    Line 122 – $wppSrLatin =& new SrLatin;

    https://sr.wordpress.org/wordpress-4.9.1-sr_RS.zip

    • This topic was modified 1 year, 10 months ago by  Slllobodan.
    • This topic was modified 1 year, 10 months ago by  Slllobodan.
    • This topic was modified 1 year, 10 months ago by  Slllobodan.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin automatically rename cyrilic to latin letters,

    class SrLatin
    {
        var $replace = array(
    	"А" => "A",
    	"Б" => "B",
    	"В" => "V",
    	"Г" => "G",
    	"Д" => "D",
    	"Ђ" => "Đ",
    	"Е" => "E",
    	"Ж" => "Ž",
    	"З" => "Z",
    	"И" => "I",
    	"Ј" => "J",
    	"К" => "K",
    	"Л" => "L",
    	"Љ" => "Lj",
    	"М" => "M",
    	"Н" => "N",
    	"Њ" => "Nj",
    	"О" => "O",
    	"П" => "P",
    	"Р" => "R",
    	"С" => "S",
    	"Т" => "T",
    	"Ћ" => "Ć",
    	"У" => "U",
    	"Ф" => "F",
    	"Х" => "H",
    	"Ц" => "C",
    	"Ч" => "Č",
    	"Џ" => "Dž",
    	"Ш" => "Š",
    	"а" => "a",
    	"б" => "b",
    	"в" => "v",
    	"г" => "g",
    	"д" => "d",
    	"ђ" => "đ",
    	"е" => "e",
    	"ж" => "ž",
    	"з" => "z",
    	"и" => "i",
    	"ј" => "j",
    	"к" => "k",
    	"л" => "l",
    	"љ" => "lj",
    	"м" => "m",
    	"н" => "n",
    	"њ" => "nj",
    	"о" => "o",
    	"п" => "p",
    	"р" => "r",
    	"с" => "s",
    	"т" => "t",
    	"ћ" => "ć",
    	"у" => "u",
    	"ф" => "f",
    	"х" => "h",
    	"ц" => "c",
    	"ч" => "č",
    	"џ" => "dž",
    	"ш" => "š",
        );
    
        function SrLatin()
        {
    	add_filter('gettext', array(&$this, 'convert_script'), 9);
    	add_filter('gettext_with_context', array(&$this, 'convert_script'), 9);
    	add_filter('ngettext', array(&$this, 'convert_script'), 9);
    	add_filter('ngettext_with_context', array(&$this, 'convert_script'), 9);
        }
    
        function convert_script($text)
        {
    	return strtr($text, $this->replace);
        }
    }
    
    $wppSrLatin =& new SrLatin;
    • This reply was modified 1 year, 10 months ago by  Slllobodan.

    Hello, @slllobodan!

    We were testing the plugin with 7.0 and 7.1, actually, I am running it now on PHP 7.1.4 and I can’t see any errors, whatsoever.

    This is quite an odd thing happening and if you want to, you can ping me on Make Slack – @lanche86

    Would love to take a look at your setup, but in the meantime, you can try switching back to one of the default themes and deactivating all the plugins but “Српски превод на латиници”.

    Let me know how it went and ping me on Slack if you are using it,
    Milan

    @slllobodan Looks like you aren’t using new version of that plugin (you are using version prior to 1.2 since line 122 is different there). We already fixed incompatibilities with PHP 7 and above last year.

    I don’t know where did you get old version, I just checked link you posted and proper plugin version is included.

    Hi guys and thank you for help, problem solved with 1.2 version.

    Not sure how this happened it must be me somehow got my files mixed Even though i reinstall WP twice and no plugins or themes were used except default.

    Anyway its all good now i appreciate all the hep.

    Cheers

    • This reply was modified 1 year, 10 months ago by  Slllobodan.
    • This reply was modified 1 year, 10 months ago by  Slllobodan.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Default WordPress plugin FATAL ERROR’ is closed to new replies.