• Resolved Ewald Harmsen

    (@tsjippy)


    Thanks for his plugin, i works great.
    However the hook does not work, if I add this:

    //Exclude folders by default when cloning
    add_filter('wpstg_clone_excl_folders', 'custom_simnigeria_wpstg_exclude_folders_custom');
    function custom_simnigeria_wpstg_exclude_folders_custom($args){
    	error_log(print_r($args,true));
    	$folders = array('wp-staging', 'wp-fastest-cache', 'wp-2fa', 'super-progressive-web-apps', 'onesignal-free-web-push-notifications');
    	return array_merge($args, $folders);
    }
    

    I get a lot of errors:

    trying to access array offset on value of type null in /.../public_html/wp-content/plugins/wp-staging/Core/Utils/Logger.php on line 146

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Rene Hermenau

    (@renehermi)

    @tsjippy

    I’d like to offer you to have a look at that issue for you.

    Can you send me the full code to support [at] wp-staging.com?
    Do you use the wp staging hooks plugin for adding the filter or did you add it into your functions.php?

    Please check if you get the same error by using the hooks plugin:
    https://github.com/WP-Staging/wp-staging-hooks/blob/master/wp-staging-hooks.php

    Cheers
    René

    Thread Starter Ewald Harmsen

    (@tsjippy)

    its working now, but to prevent the logmessages I had to add the following:

    file Logger.php line 152:

    if(is_array($message)){
    				$messageString .= "[{$message["type"]}]-[{$message["date"]}] {$message["message"]}".PHP_EOL;
    			}

    file SearchReplace.php line 500:
    if ($key === '' || is_int($key) || ord($key[0]) === 0) {

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘hooks do not work’ is closed to new replies.