When return form PagSeguro:

- warning: current() [function.current]: Passed variable is not an array or object in [path-to-modules-directory]/uc_pagseguro/uc_pagseguro.module on line 283.
- warning: next() [function.next]: Passed variable is not an array or object in [path-to-modules-directory]/uc_pagseguro/uc_pagseguro.module on line 284.

Any idea to solve this?

CommentFileSizeAuthor
#2 1298200.patch896 byteswasare

Comments

wasare’s picture

My suggestion is:

call these functions typecasting the variable:

next((array) $var)
current((array) $var)

wasare’s picture

Status: Active » Needs review
StatusFileSize
new896 bytes

My patch fix the warnings.

FaBMak’s picture

Almost a year and this bug was not fixed.

warning: current() expects parameter 1 to be array, boolean given in /pathto/sites/all/modules/uc_pagseguro/uc_pagseguro.module on line 283.
warning: next() expects parameter 1 to be array, boolean given in /pathto/sites/all/modules/uc_pagseguro/uc_pagseguro.module on line 284.

Any new ideas for this, since i've tried the patch and didn't work.