Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Error when calling PHP function

By: dominornovus on Oct 17th, 2012  |  syntax: PHP  |  size: 0.24 KB  |  views: 42  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2.  
  3. //http://stackoverflow.com/a/12944764/835950
  4.  
  5. $older = "2012-11-01";
  6. $newer = "2012-12-25";
  7. get_timespan_string($older, $newer);
  8.  
  9. // Produces this error: "Fatal error: Call to a member function format() on a non-object[...]"
  10.  
  11. ?>