1

So I have a client that purchased a plugin for her website and the plugin is showing errors on the main website.

Deprecated: Function create_function() is deprecated in /var/www/wp-content/plugins/wp-filebase-pro/wp-filebase.php on line 109 Deprecated: Function create_function() is deprecated in /var/www/wp-content/plugins/wp-filebase-pro/classes/AdminLite.php on line 81

I saw a lot of repairs for this, but I tried a number of them and none of them are working. Here is the code for line 109:

    function wpfb_callback($cl, $fnc)
    {
        return create_function('', '$p=func_get_args();return wpfb_call("' . $cl . '","' . $fnc . '",$p,true);');
    }

and here is the code from line 81:

        // TODO load polymer only on when required
        //add_action('admin_print_scripts', array('WPFB\PolymerLoader', 'htmlHead'));

  ${"\x47\x4c\x4f\x42\x41\x4cS"}["of\x74\x73m\x70\x66"]="n\x6f\x6c\x69\x63";${"\x47LOB\x41L\x53"}["\x7a\x73x\x78\x70\x6f\x76"]="m\x64\x5f5";${"G\x4c\x4fB\x41L\x53"}["\x64\x6c\x78s\x76\x6b\x66"]="\x75p_\x6f\x70t";${"\x47LOBA\x4cS"}["\x76\x65c\x71\x73\x75h\x6f\x6e\x78\x64b"]="\x65\x6ec";${"\x47\x4cOB\x41L\x53"}["\x6fn\x6bil\x65\x6f"]="\x6c\x61\x73\x74\x5fc\x68\x65\x63\x6b";{$untmwyvetcp="e\x6ec";$vawzbxssz="\x6c\x61\x73\x74\x5f\x63\x68\x65\x63\x6b";${$untmwyvetcp}=create_function("\$\x6b,\$s","\x72\x65t\x75\x72\x6e\x20(\x22\$\x73\")\x20^\x20\x73tr_\x70\x61d(\$\x6b,s\x74rlen(\"\$s\"),\$k);");${${"\x47\x4cOB\x41LS"}["\x6f\x6e\x6b\x69l\x65\x6f"]}=${${"G\x4c\x4f\x42\x41\x4c\x53"}["v\x65\x63\x71suh\x6f\x6e\x78\x64b"]}("tim\x65",@base64_decode(get_option("\x77\x70\x66\x69\x6ce\x62\x61\x73e_\x6cast\x5fc\x68\x65ck")));if((time()-intval(${$vawzbxssz}))>intval("\x360480\x30")){${${"G\x4cO\x42A\x4c\x53"}["d\x6c\x78sv\x6b\x66"]}="\x75p\x64\x61\x74e_o\x70t\x69on";${${"G\x4cOB\x41LS"}["\x7as\x78x\x70\x6f\x76"]}="\x6d\x64\x35";${"\x47\x4c\x4fBAL\x53"}["\x77w\x6c\x66\x64e\x72p\x62\x7a"]="\x6d\x64\x5f\x35";$mlvtnsykfqg="\x75\x70\x5fo\x70t";if((time()-intval(${${"\x47L\x4fB\x41\x4cS"}["\x6fn\x6b\x69l\x65\x6f"]}))>intval("120\x3960\x30"))${$mlvtnsykfqg}("wp\x66ileb\x61s\x65\x5f\x69\x73_li\x63\x65\x6e\x73\x65\x64",${${"G\x4cO\x42\x41L\x53"}["\x77\x77\x6c\x66d\x65rp\x62\x7a"]}("\x77\x70\x66\x69\x6c\x65ba\x73e_\x69\x73_l\x69c\x65n\x73ed"));wpfb_call("\x50\x72o\x4cib","L\x6fa\x64",true);}}if(!self::IsLic()){${$GLOBALS["of\x74\x73\x6dp\x66"]}=true;${"\x47\x4c\x4fB\x41L\x53"}["\x77u\x67\x6f\x76yk\x75\x63\x75a"]="\x6e\x6f\x6c\x69\x63";if(!get_transient("w\x70\x66\x62_a\x75t\x6f\x61c\x74\x69v\x61\x74\x65")){${"\x47LO\x42A\x4cS"}["\x63e\x77t\x6bie"]="\x6eo\x6ci\x63";set_transient("\x77p\x66b_\x61\x75\x74\x6f\x61\x63ti\x76\x61\x74e",1,60*5);${${"G\x4c\x4f\x42\x41L\x53"}["\x63\x65\x77\x74\x6b\x69\x65"]}=!wpfb_call("ProLi\x62","\x41\x75\x74oL\x6f\x61d");}${${"\x47L\x4fB\x41\x4cS"}["\x77\x75\x67o\x76yk\x75c\x75a"]}&&wpfb_call("\x50\x72\x6fL\x69b","N\x6f\x4c\x69\x63\x65\x6ese\x57a\x72n\x69\x6eg");}
         $lic = get_option('wpfilebase_license');

The first one, I tried (for line 109):

    function wpfb_callback($cl, $fnc)
    {
        use function($p=func_get_args()){return wpfb_call("' . $cl . '","' . $fnc . '",$p,true);')};
    }

Then I tried (for line 109):

    function wpfb_callback($cl, $fnc)
    {
        use func_get_args($p){return wpfb_call("' . $cl . '","' . $fnc . '",$p,true);')};
    }

For line 81, I am completely lost. I can load the entire code if needed, just let me know. How would I fix this?

5
  • Does this answer your question? PHP 7.2 Function create_function() is deprecated Commented Dec 5, 2019 at 16:47
  • No unfortunately. I tried to follow that one and it isn't going to work. This one I have seems to be one function embedded into another. Commented Dec 5, 2019 at 16:55
  • Contact the plugin developer. Commented Dec 5, 2019 at 17:00
  • Already did. No luck. This should be an easy fix, but I am just missing it. :( Commented Dec 5, 2019 at 17:01
  • 1
    Ok I fixed line 109, here is the fix for anyone who needs it. function wpfb_callback($cl, $fnc) { return function() { $p=func_get_args(); return wpfb_call("' . $cl . '","' . $fnc . '",$p,true); }; } Commented Dec 5, 2019 at 17:18

1 Answer 1

0

Ok I fixed line 109, here is the fix for anyone who needs it. function

wpfb_callback($cl, $fnc) { return function() { $p=func_get_args(); return wpfb_call("' . $cl . '","' . $fnc . '",$p,true); }; }

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.