«

»

Print this Post

Disable PHP warnings in seyret

The seyret video module used on this site is awesome, but the PHP warnings it was spewing out on my site were unacceptable. Finally tracked it down.

The errors looked like this:

Notice: Undefined variable: catlistoption in /home/content/html/components/com_seyret/views/video/video.view.php
on line 0

Warning: Invalid argument supplied for foreach() in /home/content/html/libraries/joomla/html/html/select.php
on line 68

This was driving me crazy. I checked my php5.ini file, errors turned off, threw a .htaccess file in the specific folder… no love, I tried manually putting error_reporting(0) into the questionable file, the ioncube loader didn’t like that one bit. Then I started poking around the seyret code and found this:

 //Don't forget to delete
 error_reporting(E_ALL);
 ini_set('display_errors', 1);
 

Hiding out in /home/content/html/components/com_seyret/seyret.php

Looks like whoever put that in there forgot to delete it :)

Commenting out those lines clean up the view. The errors themselves don’t seem to affect the functionality of the plugin, so I’m not too concerned about it.

Permanent link to this article: http://www.lukemacneil.com/2010/04/29/disable-php-warnings-in-seyret/

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>