Prevent 'PHP Catchable fatal error:  Argument 1 passed to xPDOObject::load()' error on fetching thumbnail from cache

(cherry picked from commit 8e11c5ca60a8e057bbd6532109c54f4cf95b3216)
Prevent session write errors from phpthumb cache
Prevent session write errors from phpthumb cache

Merge branch 'bug-phpthumb-session' into release-2.2

* bug-phpthumb-session:
  Prevent session write errors from phpthumb cache
  Prevent 'PHP Catchable fatal error:  Argument 1 passed to xPDOObject::load()' error on fetching thumbnail from cache