• Hi there!

    I’ve recently installed a payment module plugin. It seems to be working perfectly except for a little bug that really annoys me.

    Just a second before being redirected to the tpv or payment page I get this message:

    call_user_func_array() expects parameter 1 to be a valid callback, class'\GFP_Redsys´ does not have a method ´set_entry_meta´in /home/namarga/public_html/wp-includes/plugin.php on line 429.

    So, apparently it’s a usual problem with this plugin and the support guys in the company tell me to change the variable display_errors to false so the mistake is not shown.

    First of all, I don’t know where to find this particular variable within all the php files and second, I really don’t know if this is the appropriate thing to do since, if there’s an error, it would not be displayed hence, I would not be able to fix it if needed.

    Could anyone advice me in that matter?

    Thank you

    Nora

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    When one is developing code, one wants to know of all errors so they can be corrected. Once the code goes on a production site, we do not want any errors shown to users. It is actually a security risk to do so. Instead we typically send significant errors to a log file that is checked once in a while. It’s a good idea to only log significant errors so the log file does not fill with inconsequential notices.

    How one manages these configurations will vary from host to host. First of all, check that WP_DEBUG is defined as false in your wp-config.php file. That often will suppress error display without you doing anything else. If you are still seeing error messages, then you do need to set display_errors to off (not false please). This is in a configuration file named php.ini. It’s usually in the /php/ folder above your /public_html/. You may not have access to this file at all, or it may be accessed through a sym_link placed elsewhere. If you can edit php.ini, the line should currently read display_errors=on, just find it and change on to off and save the file.

    If you cannot edit php.ini, you may be able to override it in wp-config.php. Insert @ini_set('display_errors','Off'); above the /* That's all, stop editing! Happy blogging. */ line. It is possible your PHP is configured so that @ini_set() cannot override the settings. In that case, contact your host and have them change the setting for you.

    FYI, there’s several settings you can change either with @ini_set() or in php.ini to tweak error handling to your precise preference. See [[Editing_wp-config.php#Configure_Error_Logging|Configure Error Logging]].

Viewing 1 replies (of 1 total)

The topic ‘Php mistake with plugin’ is closed to new replies.