Closed (fixed)
Project:
Cache
Version:
6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
12 Aug 2009 at 09:41 UTC
Updated:
30 Aug 2009 at 19:40 UTC
hi,
i know this module is just in the works but hey this is a bit over the top *g
notice: Undefined index: bytes_used in /var/www/drupal-hfopi/sites/all/modules/cache/cache.admin.inc on line 58.
notice: Undefined index: bytes_total in /var/www/drupal-hfopi/sites/all/modules/cache/cache.admin.inc on line 58.
warning: Division by zero in /var/www/drupal-hfopi/sites/all/modules/cache/cache.admin.inc on line 58.
notice: Undefined index: hits in /var/www/drupal-hfopi/sites/all/modules/cache/cache.admin.inc on line 69.
notice: Undefined index: misses in /var/www/drupal-hfopi/sites/all/modules/cache/cache.admin.inc on line 76.
notice: Undefined index: gets in /var/www/drupal-hfopi/sites/all/modules/cache/cache.admin.inc on line 87.
notice: Undefined index: sets in /var/www/drupal-hfopi/sites/all/modules/cache/cache.admin.inc on line 94.
notice: Undefined variable: req_sets in /var/www/drupal-hfopi/sites/all/modules/cache/cache.admin.inc on line 98.
notice: Undefined index: bytes_used in /var/www/drupal-hfopi/sites/all/modules/cache/cache.admin.inc on line 108.
notice: Undefined index: bytes_total in /var/www/drupal-hfopi/sites/all/modules/cache/cache.admin.inc on line 109.
notice: Undefined index: bytes_used in /var/www/drupal-hfopi/sites/all/modules/cache/cache.admin.inc on line 109.
notice: Undefined index: hits in /var/www/drupal-hfopi/sites/all/modules/cache/cache.admin.inc on line 110.
notice: Undefined index: misses in /var/www/drupal-hfopi/sites/all/modules/cache/cache.admin.inc on line 111.
notice: Undefined index: gets in /var/www/drupal-hfopi/sites/all/modules/cache/cache.admin.inc on line 112.
notice: Undefined index: sets in /var/www/drupal-hfopi/sites/all/modules/cache/cache.admin.inc on line 113.
notice: Undefined variable: req_sets in /var/www/drupal-hfopi/sites/all/modules/cache/cache.admin.inc on line 113.
notice: Undefined index: req_rate in /var/www/drupal-hfopi/sites/all/modules/cache/cache.admin.inc on line 124.
notice: Undefined index: hit_rate in /var/www/drupal-hfopi/sites/all/modules/cache/cache.admin.inc on line 130.
notice: Undefined index: miss_rate in /var/www/drupal-hfopi/sites/all/modules/cache/cache.admin.inc on line 136.
notice: Undefined index: set_rate in /var/www/drupal-hfopi/sites/all/modules/cache/cache.admin.inc on line 142.
as it seems most developers have not set the warnings to 'enabled', it seems like a good idea to create a module for patching index.php to show EVERYTHING... mmhh expect to see that module soon as i can't stand much longer this flood of notices in every contrib piece of code i activate.. jeez running SELECT * from `watchdog` WHERE `variables` REGEXP 'modulename.module' every now and then can not possibly overcharge module devs too much huh...
Comments
Comment #1
eMPee584 commentedwow... i just discovered that my
at the beginning of index.php has no effect at all and the error logging settings option 'to log AND TO SCREEN' already does include PHP warnings and notices...
This means that there's absolutely NO excuse for ANY module to ship with obvious errors, some even on EVERY page call like f.e. this code:
this really comes as a shock to me, meaning that hundreds of contrib module developers don't give a FSCK about error messages AT ALL (you excluded, of course). Great prerequisite of publishing code that is potentially being run on up to 100000 drupal sites. WTFOMG!!1!!!11eleven
Comment #2
melon commentedThis will be a great module, keep up the good work doq!
I suppose the division by zero error comes at bins where $stats['bytes_total'] is zero. I think this is the case with database bins (would be there any other bins like this?)
Perhaps a quick fix would do fine with a check that no statistics should be generated for database caching at all.
Comment #3
doq commentedStatistics not supported.message will be shown for bins caching implementations of which doesn't support statistics.Comment #4
doq commentedComment #5
eMPee584 commentedHey doq if there are no statistics for that module, some code should prevent trying what is being tried. IMHO, no user action or page request should produce any PHP warnings.
Comment #6
doq commentedOk, can you please try latest 1.0-alpha6?