Showing error “Function create_function() is deprecated”

Problem lies in your theme. It’s not compatible with PHP 7.2. In this version the create_function is deprecated and you should use Anonymous Functions instead. So for example instead of something like this: $callback = create_function(”, ‘echo “‘.str_replace(‘”‘, ‘\”‘, $section[‘desc’]).'”;’); You should use this: $callback = function() { echo str_replace(‘”‘, ‘\”‘, $section[‘desc’]); };

Why on Earth am I getting “undefined_index” errors?

It’s a common PHP error, usually when you try to access an array member with a non-existent key; $array = array( ‘hello’ => ‘world’ ); echo $array[‘foobar’]; // undefined index You should check for the key first with isset( $array[‘foobar’] ); UPDATE: In this case, I would chuck in a loop that sets-up the variables … Read more

Is it possible to disable caching of an option when using w3 total cache?

okay, here we go. try this: in your functions.php modify the behaviour of ai1ec_options: $ai1ec_options = get_option(‘ai1ec_options’); delete_option(‘ai1ec_options’); add_option(‘ai1ec_options’, $ai1ec_options, ”, ‘no’); // thanks for your suggestion 🙂 be careful though, as you might lose your set options, so be sure to get them from the database first. or create a backup option. afterwards, clear … Read more

How to use WP_Error $data argument?

$this->error_data[$code] … the WP_Error object holds $data in an array and $code is the key. The add_data method clearly states: The error code can only contain one error data. But the $data (mixed) can be an array or an object and carry as many keys/properties as you need. It’s up to your handlers how they … Read more

Debug mode shows Strict Standards

Just don’t set WP_DEBUG to TRUE. The error level is set in wp_debug_mode(), which is called in wp-settings.php before any plugins are loaded. If you leave the default values WordPress will set it to: error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR ); But you … Read more

Error 404 Page Not Found When Updating a Post or Page

Updating Permalink changes update your permalinks settings and flush rewrite rules. In most cases this fixes the WordPress posts 404 error. BTW, you already tried this and I hpe your .htaccess should be writable. Have you checked it? If not then you can change .htaccess file permission temporary writable by changing the permissions to 666 … Read more

WordPress Redirecting to wp-admin/install.php

I’ve had this problem. I contacted my hosting provider and they told me it happened because I exceeded maximum queries per hour limit and therefore access to the database was temporarily locked, so WP couldn’t read from it.

How to stop certain warning logging in error.log?

“Technically” it’s just a PHP warning and not an error, and you should not have warnings enabled on production servers. You can disable PHP from logging warnings and it will still log errors to the error log file. You can disable PHP warnings by setting it in a custom php.ini file on the server (all … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)