WordPress.org

Ready to get started?Download WordPress

Forums

WP Native Dashboard
Deprecated function split() / Strict Standards error (3 posts)

  1. Ov3rfly
    Member
    Posted 11 months ago #

    With define('WP_DEBUG', true); in wp-config.php some errors can be observed on settings page of WP Native Dashboard:

    At each entry of installed languages:

    Deprecated: Function split() is deprecated in .../wp-content/plugins/wp-native-dashboard/wp-native-dashboard.php on line 90

    Strict Standards: Only variables should be passed by reference in .../wp-content/plugins/wp-native-dashboard/wp-native-dashboard.php on line 90

    At downloads:

    Deprecated: Function split() is deprecated in .../wp-content/plugins/wp-native-dashboard/wp-native-dashboard.php on line 547

    File wp-native-dashboard.php:

    Suggested fix 1: Use explode() instead of split() in line 90 and 547, see also http://www.php.net/manual/en/function.split.php

    This function has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged.

    Suggested fix 2, line 90, currect version:

    function wp_native_dashboard_is_rtl_language($locale) {
    	$rtl = array('ar', 'ckb', 'fa', 'he', 'ur', 'ug');
    	return in_array(array_shift(split('_',$locale)), $rtl);
    }

    Changed version, array_shift ( array &$array ) requires a variable by reference instead of just a function result:

    function wp_native_dashboard_is_rtl_language($locale) {
    	$rtl = array('ar', 'ckb', 'fa', 'he', 'ur', 'ug');
    	$lang = explode('_',$locale);
    	return in_array(array_shift($lang), $rtl);
    }

    Thanks for the great plugin.

    http://wordpress.org/plugins/wp-native-dashboard/

  2. codestyling
    Member
    Plugin Author

    Posted 11 months ago #

    Will be changed with next updates. Good catch.

  3. khromov
    Member
    Posted 10 months ago #

    Also having this issue. Any idea when the new version will be out?

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.