WordPress.org

Support

Support » Plugins and Hacks » WP SVG Icons » [Resolved] Only variables should be passed by reference line 115

[Resolved] Only variables should be passed by reference line 115

Viewing 5 replies - 1 through 5 (of 5 total)
  • Also receiving this for line 137

    $urlBasename = array_pop(explode('/', $actual_link));
    Plugin Author Evan Herman

    @eherman24

    Hm,

    I think I know what the issue is. Fortunately the issue isn’t going to affect the plugin. It is just a warning to let you know. I will re-code this section of the plugin to avoid this error, and I will push out an update. Thank you for making me aware of the issue Chirag!

    Evan

    Plugin Author Evan Herman

    @eherman24

    Hi Chirag Vora,

    This issue will be resolved in the latest version of the plugin. If you’d like to resolve the issue yourself (or any one else reading this) you can do so by replacing the following lines inside of the main plugin file, wordpress-svg-icons-plugin.php

    Open that file, and search for this function:
    wp_svg_change_downloads_upload_dir()

    replace the code within this function with these lines:

    $actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
    
    	$exploded_link = explode('/', $actual_link);
    
    	$urlBasename = array_pop($exploded_link);
    
    	if ($urlBasename == 'admin.php?page=wp-svg-icons-upload-custom-pack' ) {
    
    		add_filter( 'upload_dir', 'wp_svg_set_upload_dir' );
    
    	}

    Now the function right below it,wp_svg_customPack_installed_error(). Replace the first three lines of code within this function with this code:

    $actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
    
    		$exploded_link = explode('/', $actual_link);
    
    		$urlBasename = array_pop($exploded_link);

    This should remove the warnings being thrown by the wp_debug. Sorry about that!

    Thank you for reply Evan. You don’t have anything to be sorry about. Your plugins is awesome. I have an addition query. Does this support IE below v8 and old versions of android?

    Btw, custom icon packs are not showing up.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Only variables should be passed by reference line 115’ is closed to new replies.
Skip to toolbar