Ticket #785 (closed Bug: invalid)

Opened 11 months ago

Last modified 10 months ago

Cache get doesn't unserialize well

Reported by: rodrigo Owned by: - No owner -
Priority: critical Milestone: 2.2.1
Component: Libraries:Cache Version: 2.2 Release
Keywords: cache unserialize get Cc:

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

Change History

Changed 10 months ago by Shadowhand

  • 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.

Note: See TracTickets for help on using tickets.