Changeset 971 in svn for trunk/xcache.c


Ignore:
Timestamp:
2012-07-14T02:34:31Z (3 years ago)
Author:
Xuefer
Message:

closes #37: avoid crash storing object. raise error instead

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xcache.c

    r965 r971  
    28922892    }
    28932893
     2894    if (Z_TYPE_P(value) == IS_OBJECT) {
     2895        php_error_docref(NULL TSRMLS_CC, E_ERROR, "Objects cannot be stored in the variable cache. Use serialize before xcache_set");
     2896        RETURN_NULL();
     2897    }
     2898
    28942899    /* max ttl */
    28952900    if (xc_var_maxttl && (!entry_var.entry.ttl || entry_var.entry.ttl > xc_var_maxttl)) {
Note: See TracChangeset for help on using the changeset viewer.