6.0.0-RC7
6/18/26

[#11045] Listshares cache is not beeing used when previous result is an empty array
Summary Listshares cache is not beeing used when previous result is an empty array
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester goncalo.queiros (at) portugalmail (dot) net
Created 3/1/12 (5222 days ago)
Due
Updated 8/29/12 (5041 days ago)
Assigned 3/8/12 (5215 days ago)
Resolved 3/8/12 (5215 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch Yes

History
3812 Git Commit Comment #12 Reply to this comment
Changes have been made in Git (master):

commit 0cdd9e9d58135f152973c3c4648f32f312d8bb92
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Thu Mar 8 16:44:44 2012 -0500

     Revert "Revert "[mjr] Properly cache empty listShares results 
(Bug #11045).""

     This reverts commit 2424ea5ba64ffb9e566cc148f6db9c8497d0e99a.

  framework/Share/lib/Horde/Share/Sql.php   |    6 +++---
  framework/Share/lib/Horde/Share/Sqlng.php |    6 +++---
  framework/Share/package.xml               |    4 ++--
  3 files changed, 8 insertions(+), 8 deletions(-)

http://git.horde.org/horde-git/-/commit/0cdd9e9d58135f152973c3c4648f32f312d8bb92
3412 Git Commit Comment #11 Reply to this comment
Changes have been made in Git (master):

commit 2424ea5ba64ffb9e566cc148f6db9c8497d0e99a
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Thu Mar 8 12:38:11 2012 -0700

     Revert "[mjr] Properly cache empty listShares results (Bug #11045)."

     This reverts commit fc4877ab48a28d5375f7a42af4989e179c24f58c.

     This is causing fatal errors on any access to Turba.

  framework/Share/lib/Horde/Share/Sql.php   |    6 +++---
  framework/Share/lib/Horde/Share/Sqlng.php |    6 +++---
  framework/Share/package.xml               |    4 ++--
  3 files changed, 8 insertions(+), 8 deletions(-)

http://git.horde.org/horde-git/-/commit/2424ea5ba64ffb9e566cc148f6db9c8497d0e99a
2512 Git Commit Comment #10 Reply to this comment
Changes have been made in Git (master):

commit fc4877ab48a28d5375f7a42af4989e179c24f58c
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Thu Mar 8 00:18:02 2012 -0500

     [mjr] Properly cache empty listShares results (Bug #11045).

  framework/Share/lib/Horde/Share/Sql.php   |    6 +++---
  framework/Share/lib/Horde/Share/Sqlng.php |    6 +++---
  framework/Share/package.xml               |    4 ++--
  3 files changed, 8 insertions(+), 8 deletions(-)

http://git.horde.org/horde-git/-/commit/fc4877ab48a28d5375f7a42af4989e179c24f58c
525 goncalo (dot) queiros (at) portugalmail (dot) net Comment #9 Reply to this comment
Sorry forgot to check the develop branch
This has been fixed already.
03 Jan Schneider Comment #8 Reply to this comment
This has been fixed already.
162 goncalo (dot) queiros (at) portugalmail (dot) net Comment #7 Reply to this comment
List shares is now caching a false value if $sharelist is empty.
$this->_listcache[$key] = empty($sharelist) ? false : $sharelist;

The problem is that on the first run the method will return false, but 
on the second run, because of:
return is_array($this->_listcache[$key]) ? $this->_listcache[$key] : array();

it will return an empty array.
Shouldn't it always return an empty array?
549 Michael Rubinsky Comment #6
State ⇒ Resolved
Reply to this comment
Typo fixed by:

55f60efb24d39dd1758a21b130a71e058d457462
169 Git Commit Comment #5 Reply to this comment
Changes have been made in Git (develop):

commit 0cdd9e9d58135f152973c3c4648f32f312d8bb92
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Thu Mar 8 16:44:44 2012 -0500

     Revert "Revert "[mjr] Properly cache empty listShares results 
(Bug #11045).""

     This reverts commit 2424ea5ba64ffb9e566cc148f6db9c8497d0e99a.

  framework/Share/lib/Horde/Share/Sql.php   |    6 +++---
  framework/Share/lib/Horde/Share/Sqlng.php |    6 +++---
  framework/Share/package.xml               |    4 ++--
  3 files changed, 8 insertions(+), 8 deletions(-)

http://git.horde.org/horde-git/-/commit/0cdd9e9d58135f152973c3c4648f32f312d8bb92
577 Git Commit Comment #4 Reply to this comment
Changes have been made in Git (develop):

commit 2424ea5ba64ffb9e566cc148f6db9c8497d0e99a
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Thu Mar 8 12:38:11 2012 -0700

     Revert "[mjr] Properly cache empty listShares results (Bug #11045)."

     This reverts commit fc4877ab48a28d5375f7a42af4989e179c24f58c.

     This is causing fatal errors on any access to Turba.

  framework/Share/lib/Horde/Share/Sql.php   |    6 +++---
  framework/Share/lib/Horde/Share/Sqlng.php |    6 +++---
  framework/Share/package.xml               |    4 ++--
  3 files changed, 8 insertions(+), 8 deletions(-)

http://git.horde.org/horde-git/-/commit/2424ea5ba64ffb9e566cc148f6db9c8497d0e99a
597 Michael Slusarz Comment #3
State ⇒ Assigned
Reply to this comment
Reverted - causing fatal errors on any page that accesses Turba's API.  Error:

Fatal error: Call to a member function get() on a non-object in 
/disk2/src/horde/turba/lib/Turba.php on line 452
505 Michael Rubinsky Assigned to Michael Rubinsky
State ⇒ Resolved
 
565 Git Commit Comment #2 Reply to this comment
Changes have been made in Git (develop):

commit fc4877ab48a28d5375f7a42af4989e179c24f58c
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Thu Mar 8 00:18:02 2012 -0500

     [mjr] Properly cache empty listShares results (Bug #11045).

  framework/Share/lib/Horde/Share/Sql.php   |    6 +++---
  framework/Share/lib/Horde/Share/Sqlng.php |    6 +++---
  framework/Share/package.xml               |    4 ++--
  3 files changed, 8 insertions(+), 8 deletions(-)

http://git.horde.org/horde-git/-/commit/fc4877ab48a28d5375f7a42af4989e179c24f58c
257 goncalo (dot) queiros (at) portugalmail (dot) net Comment #1
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Patch ⇒ Yes
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ Listshares cache is not beeing used when previous result is an empty array
Type ⇒ Bug
Reply to this comment
The listshares stores an empty array on cache, but when it verifies 
the existence of cache, it check if the value is !empty

Saved Queries