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

  1. Ov3rfly
    Posted 1 year 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.


  2. codestyling
    Plugin Author

    Posted 1 year ago #

    Will be changed with next updates. Good catch.

  3. khromov
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.