1 |
Notice: Undefined index: page in /home/content/79/7603579/html/wp-content/plugins/php-text-widget/plugin.php on line 15 |
Or something similar, there is an easy solution to this annoying problem. First, load up the file plugin.php from the plugins directory, usually wp-content/plugins/php-text-widget/plugin.php. You may want to download it using your FTP program so you can work on it locally and then update it.
Then, find these lines of code:
1 2 3 4 5 6 7 8 9 |
{ if (strpos($_GET['page'], basename(dirname(__FILE__)) . '/') === 0) { echo '<link type="text/css" rel="stylesheet" href="' . plugins_url('admin.css', __FILE__) . '">'; } } |
What you are going to want to do is replace that entire section with this:
1 2 3 4 5 6 7 8 9 |
{ if (isset($_GET['page'])){ if (strpos($_GET['page'], basename(dirname(__FILE__)) . '/') === 0) { echo '<link type="text/css" rel="stylesheet" href="' . plugins_url('admin.css', __FILE__) . '">'; } }} |
That should solve the problem! The issue is that the plugin is calling $_GET[‘page’] without first checking if it exists. It’s not a huge error and won’t break your site most likely, but it is definitely a good idea to fix it. I was pretty happy when I tried this and it fixed it! Hopefully it will work for you too, let me know in the comments!