i have 4 error in the plugin logo slider

the first error in line 89 and i fixed it and one of the other the errors in 225

Notice: Undefined index: action in /plugins/logo-slider/logo-slider.php on line 89 and the other 3 errors in on line 225

but there is 2 other left in 225

225    if(isset($wp_logo_slider_images['update']) == 'Added' || $wp_logo_slider_images['update'] == 'Deleted' || $wp_logo_slider_images['update'] == 'Updated') {

and when i click update it give me

Notice: clean_url is deprecated since version 3.0! Use esc_url() instead. in /wp-includes/functions.php on line 2841

but when i one funcution.php i cant find clean_url so i could replace it

  • 1
    Can you please rephrase your question to have an actual question? This is not a bug reporting forum. – GhostToast Jul 23 '13 at 14:25

The logic on line 225 is bad.

  isset($wp_logo_slider_images['update']) == 'Added' 
  || $wp_logo_slider_images['update'] == 'Deleted' 
  || $wp_logo_slider_images['update'] == 'Updated') {

isset($wp_logo_slider_images['update']) is never going to equal 'Added' but that isn't where the error comes in. PHP will try to use $wp_logo_slider_images['update'] twice on that line without checking that the value is set.

What you need is:

  && ( 
    $wp_logo_slider_images['update']== 'Added' 
    || $wp_logo_slider_images['update'] == 'Deleted' 
    || $wp_logo_slider_images['update'] == 'Updated'
) {

Notice the extra set of () to group the ||s and make sure that PHP does not try to access $wp_logo_slider_images['update'] if it isn't set.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.