Changeset 960


Ignore:
Timestamp:
2012-07-09T10:38:25+02:00 (2 years ago)
Author:
moo
Message:

fixed #283: XCache admin APIs (admin page) cause SEGV if XCache failed to initize

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r956 r960  
    77 * WIN32: kill invalidate CRT parameters on shutdown 
    88 * fixed: <=PHP_5_2 duplicate error message failed to include file 
     9 * fixed #283: XCache admin APIs (admin page) cause SEGV if XCache failed to initize 
    910 
    10112.0.0 2012-04-20 
  • trunk/xcache.c

    r957 r960  
    27312731    switch (optype) { 
    27322732        case XC_OP_COUNT: 
    2733             RETURN_LONG(size) 
     2733            RETURN_LONG(caches ? size : 0) 
    27342734            break; 
    27352735 
    27362736        case XC_OP_INFO: 
    27372737        case XC_OP_LIST: 
    2738             if (id < 0 || id >= size) { 
     2738            if (!caches || id < 0 || id >= size) { 
    27392739                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cache not exists"); 
    27402740                RETURN_FALSE; 
     
    27582758                int entryslotid, c; 
    27592759 
    2760                 if (id < 0 || id >= size) { 
     2760                if (!caches || id < 0 || id >= size) { 
    27612761                    php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cache not exists"); 
    27622762                    RETURN_FALSE; 
     
    28122812 
    28132813#define VAR_DISABLED_WARNING() do { \ 
    2814         php_error_docref(NULL TSRMLS_CC, E_WARNING, "xcache.var_size is either 0 or too small to enable var data caching"); \ 
     2814        php_error_docref(NULL TSRMLS_CC, E_WARNING, "XCache var cache was not initialized properly. Check php log for actual reason"); \ 
    28152815} while (0) 
    28162816 
Note: See TracChangeset for help on using the changeset viewer.