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  
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes. If this is not your bug, you can add a comment by following this link. If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
2005-11-17 17:12 UTC
Package:
Bug Type:
Summary:
From: tobor at robotsrule dot com
New email:
PHP Version: Package Version: OS:

 

 [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