"Notice: Undefined offset:xyz in system_charts_build()" appears for lines 189 and 199 in system_chart.module.

Comments

johnv’s picture

Status: Active » Needs review
StatusFileSize
new1.14 KB

Attached patch solves the issue.

13rac1’s picture

This makes sense. I'll test/apply/commit on Monday.

wojtha’s picture

Status: Needs review » Reviewed & tested by the community

Tested

eMPee584’s picture

The patch does fix the notices as advertised, however there was another:

Notice: Undefined index: watchdog_severity in chart_unique_color() (line 1299 of /var/www/localhost/htdocs/d7.git/sites/all/modules/chart/chart.module).

coming up on the admin/reports/charts/watchdog path, and i ended up completely reshuffling the chart_unique_color() function, the logic should be more clear now. Also added a grey color entry to the watchdog color scheme. Attached diff contains previous patch.

13rac1’s picture

Status: Reviewed & tested by the community » Needs review

Updated patch needs review.

eMPee584’s picture

True, true... ;)

danreb’s picture

Status: Needs review » Reviewed & tested by the community

It Works!

I applied the patch and it works and removed the notice and warning, thanks!

danreb’s picture

Oh I almost forgot, I applied the patch in #4 by eMPee584

eMPee584’s picture

@danreb: did you push it live? because i can't see nothing here...

danreb’s picture

@eMPee584 : I applied your patch in #4 on the website that I am developing and it fixed the problem of:

Notice: Undefined offset:xyz in system_charts_build()" appears for lines 189 and 199 in system_chart.module

and

Notice: Undefined index: watchdog_severity in chart_unique_color() (line 1299 of /var/www/localhost/htdocs/d7.git/sites/all/modules/chart/chart.module)

so I changed the status to RTBC so that the module maintainer can look at the patch and commit it and push it live.

eMPee584’s picture

Ok lol sorry, my misreading: you are NOT the chart maintainer. Nevermind, and thx for reviewing ;-)

13rac1’s picture

Status: Reviewed & tested by the community » Fixed

Applied to 7.x-1.x-dev. Thx!

cskli911’s picture

it's work for me, thk you.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

dgastudio’s picture

Status: Closed (fixed) » Active

same problem, same solution. thank u.

can this be commited ?

13rac1’s picture

Status: Active » Closed (fixed)

It has already been committed to 7.x-1.x-dev. I'll consider making a new release next week.