PHP Notices on multiple files… and fixes.
-
I just installed your plugin on a site we are working on with wp_debug set to true, and a number of php notices are being displayed. We have gone ahead and fixed the files for you. Do you have a github repo where we can submit a pull request? if not, you really should. that other plugin that does the same thing does…
Regardless, the issues are as follows:
in the file bp-cover-admin.php on line 175:$class = ($class == "alternate")?"":"alternate";
You are not first checking if the $class var has been defined. We changed this to:
$class = (!empty($class) && $class == "alternate")?"":"alternate";
Next, in both of your theme.php template files, near line 75 you are checking if the $attachment_id is greater than zero. Again here you may not even have an attachment id, so better just check that it’s not empty:
if (!empty($attachment_id) ){
Hope this is useful. Not set up a git repo already.
- The topic ‘PHP Notices on multiple files… and fixes.’ is closed to new replies.