Bug Report #785

Cache get doesn't unserialize well

Added by Rodrigo - over 3 years ago. Updated over 3 years ago.

Status:Closed Start date:
Priority:Urgent Due date:
Assignee:Redmine Admin % Done:

0%

Category:Libraries:Cache
Target version:2.2.1
Resolution:invalid Points:

Description

I'm doing this:

// Eventos UC
$eventos = $this->cache->get('event_feed');
if(!$eventos) {
$eventos = GCalendar::instance()->getCalendarEventFeed('http://www.google.com/calendar/feeds/agendauc%40gmail.com/private-f69d01e6e5e469c3797abfb32552744c/full');
$this->cache->set('event_feed', $eventos);
}

$view = new View('eventos');
$view->eventos = $eventos;
$view->render(TRUE);

But I'm getting:

Controller_Core->_kohana_load_view( /var/www/uc/application/views/eventos.php, Array
(
[eventos] => +PHP_Incomplete_Class Object
(

...

Instead of
[eventos] => Name_Of_The_Class Object

Reference to original bug in PHP as of 2004:
http://bugs.php.net/bug.php?id=29985


Related issues

related to Kohana v3.x - Feature Request #2222: A workaround for Session to avoid __PHP_Incomplete_Class ! Kohana v3.x - v3.0.2 Closed 10/10/2009

History

Updated by Woody Gilk over 3 years ago

  • Status changed from New to Closed
  • Resolution set to invalid

The only reason you get a PHP_Incomplete_Class is when the original class of the serialized object can't be found. Make sure it's available to be autoloaded, or include it before unserializing.

This is not a cache issue.

Also available in: Atom PDF