Problem:

Notice: Undefined variable: idx in services_views_execute_view() (line 248 of /var/www/html/sites/all/modules/contrib/services_views/services_views.resource.inc).

Notice: String offset cast occurred in services_views_execute_view() (line 248 of /var/www/html/sites/all/modules/contrib/services_views/services_views.resource.inc).

Notice: Uninitialized string offset: 0 in services_views_execute_view() (line 248 of /var/www/html/sites/all/modules/contrib/services_views/services_views.resource.inc).

Reason:

code
Line 176: $row->$f_key could be an empty array.

Also, 241-244 lines: it's obvious that this part of code can't work correctly outside of foreach (foreach ($row->$f_key as $idx => $res) {). Look at json on screenshot: json

Solution:

Put 245-256 lines code inside foreach above. (foreach ($row->$f_key as $idx => $res) {)

Comments

nsk_ua created an issue. See original summary.

nikita_tt’s picture

StatusFileSize
new1.24 KB

patch file

generalredneck’s picture

I'll test this one for ya and let you know if I can get it into the next release.

aangel’s picture

This patch removed the warnings for me.

generalredneck’s picture

Status: Active » Fixed

Techincally speaking, depending on how the rows are being handled it "could" work... but only on the last row. I tested with this applied and I don't see any harm... and I do see the good... though there are no longer any warnings that I can see.

  • generalredneck committed f832df6 on 7.x-1.x authored by nsk_ua
    Issue #2905643 by nsk_ua: Multiple Notices services_views.resource.inc...

Status: Fixed » Closed (fixed)

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