PHP Errors in Various Plugin Options
-
Hello,
Just confirming what the other user below reported about the php errors. I can see this in the plugin options while running php 7.4.
There are error warnings on the following options:
Animation in
Animation out
On which page the balloon should appear?…..
Warning: Use of undefined constant drop – assumed ‘drop’ (this will throw an Error in a future version of PHP) in /wp-content/plugins/add-to-home-screen-wp/options.php on line 114
Warning: Use of undefined constant bubble – assumed ‘bubble’ (this will throw an Error in a future version of PHP) in /wp-content/plugins/add-to-home-screen-wp/options.php on line 115
Warning: Use of undefined constant fade – assumed ‘fade’ (this will throw an Error in a future version of PHP) in /wp-content/plugins/add-to-home-screen-wp/options.php on line 116
Warning: Use of undefined constant drop – assumed ‘drop’ (this will throw an Error in a future version of PHP) in /wp-content/plugins/add-to-home-screen-wp/options.php on line 125
Warning: Use of undefined constant bubble – assumed ‘bubble’ (this will throw an Error in a future version of PHP) in /wp-content/plugins/add-to-home-screen-wp/options.php on line 126
Warning: Use of undefined constant fade – assumed ‘fade’ (this will throw an Error in a future version of PHP) in /wp-content/plugins/add-to-home-screen-wp/options.php on line 127
Warning: Use of undefined constant homeonly – assumed ‘homeonly’ (this will throw an Error in a future version of PHP) in /wp-content/plugins/add-to-home-screen-wp/options.php on line 218
Warning: Use of undefined constant allpages – assumed ‘allpages’ (this will throw an Error in a future version of PHP) in /wp-content/plugins/add-to-home-screen-wp/options.php on line 219
…..
Hope this helps!
~ Michael
-
This topic was modified 5 years ago by
Michael Samson.
-
This topic was modified 5 years ago by
Michael Samson.
-
This topic was modified 5 years ago by
-
For anyone wanting to fix this issue directly, simply edit options.php as follows:
Add the $ in front of homeonly and allpages as shown below:
<option value="homeonly"<?php echo selected(get_option('pagetarget'),$homeonly); ?>><?php _e('Home Only', 'adhs'); ?></option > <option value="allpages"<?php echo selected(get_option('pagetarget'),$allpages); ?>><?php _e('All Pages', 'adhs'); ?></option>
Add the $ in front of drop, bubble, and fade as shown below:
<option value="drop"<?php echo selected(get_option('animationin'),$drop); ?>>Drop</option> <option value="bubble"<?php echo selected(get_option('animationin'),$bubble); ?>>Bubble</option> <option value="fade"<?php echo selected(get_option('animationin'),$fade); ?>>Fade</option>
Please note that the drop, bubble, and fade variables are in two locations, for the Animation In and Animation Out settings. So make these corrections in both spots.
This is a simple fix for the plugin author to make btw… =)
~ Michael
- The topic ‘PHP Errors in Various Plugin Options’ is closed to new replies.