Suppressing HTTPd warning message using PHP

I bumped into an error with the thumbnail generator for some Joomla library.
Each of the images generated would not having any image info inside but having error message instead.

So, upon checking , can’t trace from the log file.
I did tried to open up the file using the text edit , and found out it had the following content
instead of image data.

When can be read out as :

<br />
<b>Warning</b> : trim() expects parameter 1 to be string , resource given in <b> /path/to/filename.php </b> on line

Upon checking the said filename ,
found out it is using trim() function for php.

and these is just a warning message , not an error.

one of the quick solution is suppress the warning message by adding the following line before that line.

$path = trim($path);

After that, the thumbnail was generated perfectly again.. 🙂

or maybe can also use something similar as below ( ** UNTESTED ** ):

Get Free Email Updates!

Signup now and receive an email once I publish new content.

I will never give away, trade or sell your email address. You can unsubscribe at any time.


Related Post

7 Responses

  1. Harvey says:

    It is the best time to make some plans for the future and it’s time to be happy. I’ve read this post and if I could I want to suggest you some interesting things or advice. Maybe you can write next articles referring to this article. I desire to read even more things about it!

  2. Rachel says:

    Thanks for sharing your info. I really appreciate your efforts and I am waiting for your further write ups thank you once again.

  3. Brittney says:

    I do not even know the way I ended up here, however I thought this put up used to be great. I don’t recognize who you might be but certainly you’re going to a well-known blogger in case you are not already. Cheers!

  4. website says:

    What’s up, after reading this amazing article i am too delighted to share my knowledge here with colleagues.

  5. says:

    Do you mind if I quote a couple of your articles as long as I provide
    credit and sources back to your site? My blog site is in the very same niche as yours
    and my users would genuinely benefit from some
    of the information you present here. Please let me know if this okay with you.
    Many thanks!

  6. calvin klein underwear uk says:

    Incredible! This blog looks just like my old one! It’s on a completely different subject but it has pretty much the same page layout and design. Great choice of colors!

  7. calvin klein underwear uk says:

    I really like what you guys are usually up too. Such clever work and coverage!
    Keep up the amazing works guys I’ve included you guys to my own blogroll.


Anything to add?