I'm trying to clean up a few watchdog notices that are polluting my syslog file (actually it got huge, like 41GB in a day).

Nov 23 20:16:45 stg drupal: http://stg.mysite.com|1290543405|php|63.150.42.5|http://stg.mysite.com/|http://stg.mysite.com/front_features|0||Notice: Undefined offset: 1 in DartTag->key_vals() (line 196 of /var/www/vhosts/stg.mysite.com/httpdocs/sites/all/modules/dart/dart_tag.inc).

In the 6006 update, block was moved from the serialized settings to its own column. There was a holdover from the old settings array causing a watchdog notice on line 137 in dart_tags.inc where $this->obj->settings['block'] was still being checked. I'm not using the block settings feature nor have I tested it so I'm not sure if it was broken or if this fixed it.

Nov 23 20:16:44 stg drupal: http://stg.mysite.com|1290543404|php|63.150.42.5|http://stg.mysite.com/|http://stg.mysite.com/front_features|0||Notice: Undefined index: block in DartTag->load() (line 137 of /var/www/vhosts/stg.mysite.com/httpdocs/sites/all/modules/dart/dart_tag.inc).

I'm getting a few notices related to the list() = explode() on line 197 in the same file so I broke it out and checked to make sure they were set before using them.

CommentFileSizeAuthor
dart_tag-notices.patch1010 bytescdoyle

Comments

cdoyle’s picture

Oh, those quotes with the errors from syslog should be reversed. The top one is for the bottom bug and vice versa.

bleen’s picture

cdoyle: before I commit this, can you please print out the value of $pairs before you get the "Undefined offset: 1 in DartTag->key_vals() (line 196" error? I just want to understand where that error is coming from. I tried

$test = ' a|b|c';
list($x,$y,$z) = explode('|', $test);
dsm($x);
dsm($y);
dsm($z);

And all is well...

When I change $test to empty string, then $x,$y &$z are simply null and when $test = "foo" or $test = "foo|bar" there is still no NOTICE ...

cdoyle’s picture

When I run your test code passing in an empty string (or any string with fewer than 2 pipes), I get a notice.

Notice: Undefined offset: 2 in /var/www/vhosts/test.mysite.com/httpdocs/test.php on line 3 Notice: Undefined offset: 1 in /var/www/vhosts/test.mysite.com/httpdocs/test.php on line 3 

What are your php error reporting levels in your php.ini set at? Mine are set to

error_reporting = E_ALL & ~E_DEPRECATED

I'm running php 5.3 which may affect things also.

bleen’s picture

hmmm ...

error_reporting  =  E_ALL

I've tried this with both 5.2.13 & 5.3.2 and I dont get a notice with either. I did some looking around and I cant find anything that says you should be getting a NOTICE... can you confirm this on another machine?

cdoyle’s picture

More specifically, I'm using php 5.3.2-1ubuntu4.5 which is the current version after installing ubuntu 10.04 and updating. I'll try to track down a bit more about this notice and post back up here.

Right now I'm trying to track down another issue where all zones I'm setting in hook_dart_sitezone() that print tags through a block are getting set incorrectly when the user is anonymous... looks like what is coming out of dart_tag_load() isn't what I expect. I don't know if it's an implementation issue (something caching in Varnish or Memcache or preprocess not getting run) or a bug yet.

bleen’s picture

This issue has definitely been fixed in 6.x-2.x which will have its first real release soon.

bleen’s picture

Status: Needs review » Closed (won't fix)

2.0 has been released ... 6.x-1.x is not going to be supported anymore