Hola amigos!

If you’ve upgraded your PHP recently then you’ll notice it’s a lot stricter about things. Good, I say. But there will be a painful transition as people will need to learn more and program less sloppy!
This post will be updated as I come across any new php 5.3+ strict error warnings on my travels.

Todays error message:

A non well formed numeric value encountered

This was in one of my view helpers for converting Unix time to something more humanly readable.

return date("H:m", $time);

Fixed using strtotime:

return date("H:m", strtotime($time));

Stay tuned for more programming woes!

Advertisements