Closed (fixed)
Project:
Taxonomy VTN
Version:
6.x-1.10
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Oct 2011 at 13:43 UTC
Updated:
13 Nov 2011 at 21:50 UTC
Hi,
I'm getting a large number of notices like this in my watchdog log:
Notice: Undefined variable: voc_desc in taxonomy_vtn_blocks_block() (line 153 of /var/www/drupal/sites/all/modules/taxonomy_vtn/taxonomy_vtn_blocks/taxonomy_vtn_blocks.module).
Since the severity is marked as "error" I'd like to get rid of these notices.
Any ideas?
Thanks!
Comments
Comment #1
AlexisWilke commentedasb,
None.
In my version I use the variable
$voc_descon line 228 and it is either set to a DIV tag with data or the empty string. Somehow it feels like something wrong on your install. The last change in that file was Apr 5, 2011 so it would be in 6.x-1.10 which I generated in January.Thank you.
Alexis
Comment #2
asb commentedThanks for responding so quickly. It's absolutely not impossible that "something" might be wrong with my install, but I have not modified the original code ;)
Also worth mentioning is that I'm getting these errors on different D6 sites, and on different servers (environment: Debian "Squeeze", Pressflow 6.22, PHP 5.3.3-7+squeeze3). On the (older) Debian "Lenny" (with PHP 5.2.6-1+lenny13) I've not noticed these errors . To be more precises, I'm getting these errors on all sites where I have 'Taxonomy VTN' installed.
My "workaround" to suppress the errors that are cluttering my logs is to change the default setting in
php.inifromerror_reporting = E_ALL & ~E_DEPRECATEDto
error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERRORThis makes the watchdog log much prettier ;) In Debian "Lenny", I was using this error reporting level:
error_reporting = E_ALL & ~E_NOTICEIf there is no way to track down the origin of the error, maybe it's a sane "workaround" to simply suppress the errror messages?
Comment #3
AlexisWilke commentedI checked the 1.10 against my version here and they are the same.
I can tell you for sure that on line 153 there is no variable voc_desc.
This means you probably don't have the latest version on those other systems.
One way to find out is to extra 1.10 in a temp folder and then compare with diff (or cmp) to see whether you get differences. If yes, then you know what the problem is... If not, check on line 153 and let me know whether you can see the offensive variable there. If not... then it's probably PHP going funky.
Do you remove comments by any chance? It could be that you run a parser to remove "useless" entries such as empty lines and comments... ?
Thank you.
Alexis Wilke
P.S. Obfuscation works just fine otherwise, not just in software. 8-)
Comment #4
asb commentedLine 153 of
/var/www/drupal/sites/all/modules/taxonomy_vtn/taxonomy_vtn_blocks/taxonomy_vtn_blocks.modulereads on my servers:That's exactly the code I'm getting when downloading http://ftp.drupal.org/files/projects/taxonomy_vtn-6.x-1.10.zip and go to line 153 in taxonomy_vtn/taxonomy_vtn_blocks/taxonomy_vtn_blocks.module. There is no diff between the files from http://ftp.drupal.org/files/projects/taxonomy_vtn-6.x-1.10.zip and those on my sites ;)
In this file, there is
$voc_descin line 153, and the error message says nothing but "I don't know what string I'm supposed to concatenate after $count_nodes", right? However, if I'm guessing right, the eror message might be correct since I'm not using much "vocabulary descriptions", so this string will be empty in most cases if it's status isn't evaluated somewhere with something like "don't try to print me if I'm empty" (I'm no programmer, so I can't provide much help with the code, sorry).Greetings, asb
Comment #5
AlexisWilke commentedNevermind! I looked at the wrong file... So here I stand corrected!
See the patch below for the fix.
Thank you for your patience and help!
Alexis Wilke
See: http://drupalcode.org/project/taxonomy_vtn.git/commit/d21d077
Comment #6
asb commentedThanks! Looking forward to 6.x-1.11 ;)