How to Fix WordPress Undefined Variable

Problem:

I have PHP notice with this message below:

Undefined Variable : widget_ops in …….

Question:

How to fix it … ?

Answer:

Check if variable not definedĀ  and give the initial value like code below:

if(!isset($widget_ops){

$widget_ops= ‘your_value ‘;

}

 

Thanks For Reading

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *