jQuery Tools Tooltip Positioning Fix

I started using jQuery Tool’s Tooltip today and ran into a position problem. When using bottom center the tooltip would position offscreen when the target was too close to the edge of the browser.

The following ticket notes include a proposed patch

To quickly update the minified version with the proposed fix replace

g=="left"&&(f-=i);return{top:e,left:f}}

with

g=="left"&&(f-=i); if(f<0){f=0}if(f+c.width()>$(window).width()){f=$(window).width()-c.width()} return{top:e,left:f}}

Trying to clone an uncloneable object of class stdClass

Ran into the following error recently:

PHP Fatal error: Trying to clone an uncloneable object of class stdClass in /wp-includes/cache.php

Adding the following to the PHP config fixed the error

; Adding for wp-e-commerce plugin
zend.ze1_compatibility_mode = Off

The ze1_compatiblity_mode is removed in PHP 5.3 so in that case I needed to wrap the clone calls with

function clone_it($data)
{
if(get_class($data) != ‘stdClass’)
return clone $data;
else
return unserialize(serialize($data));
}