Is there a way to quickly identify the culprit when this error pops up?
“Error Close
Undefined offset: 0” is hardly descriptive and takes time to pinpoint the source.
Is there a way to quickly identify the culprit when this error pops up?
“Error Close
Undefined offset: 0” is hardly descriptive and takes time to pinpoint the source.
In most cases it is because you are trying to access the data from db-operation but the select returned an empty record set.
To avoid the error you always have to check after sc_lookup(), sc_select() wether your sql operation returned useful data.
See there (Ex. 2): http://www.scriptcase.net/docs/en_us/v81/scriptcase-macros/scriptcase-macros#sc_lookup
jsb
[QUOTE=jsbinca;39575]In most cases it is because you are trying to access the data from db-operation but the select returned an empty record set.
To avoid the error you always have to check after sc_lookup(), sc_select() wether your sql operation returned useful data.
See there (Ex. 2): http://www.scriptcase.net/docs/en_us/v81/scriptcase-macros/scriptcase-macros#sc_lookup
jsb[/QUOTE]
You’re right. It also occurs with e.g. trying to access an unset array element. I was hoping there might be an SC or PHP configuration that would disclose the exact variable at run time.