Report new bug | New search | Development Roadmap Status: Open | Feedback | All

Bug #5826 Error in example code
Submitted: 2005-10-30 17:53 UTC
From: tobor at robotsrule dot com Assigned: fab
Status: Bogus Package: Documentation
PHP Version: Irrelevant OS: n/a
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 49 - 30 = ?

 
 [2005-10-30 17:53 UTC] tobor at robotsrule dot com
Description: ------------ The documentation for the Cache_Lite::save() function is incorrect. In the sample code box, the save() call is shown as: $cache->save($data); As you can see the $id parameter is missing from the save() call. URL for the affected page is here: http://pear.php.net/manual/en/package.caching.cache-lite.cache-lite.save.php

Comments

 [2005-11-17 08:57 UTC] fab at php dot net
the $id parameter is optionnal (if not given, Cache_Lite uses the $id given in the get() method.
 [2005-11-17 08:58 UTC] fab at php dot net
the $id parameter is optionnal (if not given, Cache_Lite uses the $id given in the get() method). So the example is good.
 [2005-11-17 08:59 UTC] fab at php dot net
Thank you for taking the time to write to us, but this is not a bug. the example is good
 [2005-11-17 14:04 UTC] tobor at robotsrule dot com
When I tried to run it without the ID parameter under PHP 4.x it didn't work. When I added the parameter it worked. That's all I can go by.
 [2005-11-17 17:12 UTC] fab at php dot net
There is a problem on the example : a "echo($data);" is missing before the save() call. But I confirm that the save() call is correct. I'm fixing the missing "echo($data);" thanks