Notice: Undefined index: ** URGENT PLEASE ***

Hi,

After upgrading from v8 to 8.1, I get this message on a control app after saving and generating:

[SIZE=12px]Notice: Undefined index: sc_glo_servidor in …c[/SIZE]ontrol_depart[SIZE=12px].php on line 1291
Notice: Undefined index: sc_glo_usuario in …c[/SIZE]ontrol_depart[SIZE=12px].php on line 1291
Notice: Undefined index: sc_glo_senha in …c[/SIZE]ontrol_depart[SIZE=12px].php on line 1291
Notice: Undefined index: sc_glo_banco in …c[/SIZE]ontrol_depart[SIZE=12px].php on line 1291

This is part of code generated :[/SIZE]

1288 if (substr($cadapar[0], 0, 11) == “SC_glo_par_”)
1289 {
1290 $cadapar[0] = substr($cadapar[0], 11);
1291 $cadapar[1] = $_SESSION[$cadapar[1]];
1292 }
1293 nm_limpa_str_control_depart($cadapar[1]);

An idea ???
Thanks

Please print out the count of the array as well. Suppose your $cadapar is an empty array or an array with 1 element, then the error makes sense.
You should be able to echo it somewhere probably.
Anyway be sure to check you even have an array with 2 elements in it.

Hello rr,

Thanks for answering but those lines are not my code they are generated by sc, I use ireport link for printing invoices , the global variables are using like this in my code

When I delete those lines, I get the same error ??

if(!isset($_SESSION[‘report’]))
{
$_SESSION[‘report’]=array(‘host’=>[sc_glo_servidor],‘user’=>[sc_glo_usuario],‘pass’=>sc_decode([sc_glo_senha]),
‘db’=>[sc_glo_banco],‘pdf_query’=>’’,‘xml_file’=>’’);
}

Are the global variables names changed ?

Thanks

Hmm I dont see why then…
1290 $cadapar[0] = substr($cadapar[0], 11);
1291 $cadapar[1] = $_SESSION[$cadapar[1]];

Line 1290 or 1291 is the error line (php sometimes yells error on the line after the error).
It might be wrong due to a conversion from 8 to 8.1, it may be quicker to remake the control app by copying and pasting from your original to a new fresh application… Just my experience tho…

Yes, it’s strange to have error on lines external on our code ???

I will try the fresh app
Thanks

Strange when I run this control app directly there is no error message, but well from a form app in my project ??

What can be the reason ?

Hello,

The update was made from version 8 to 8.1 or was an update in version 8.1?
Could you recreate an example about how it is being done and send it to the e-mail bugs@scriptcase.net?

From v8.0 to v8.1.017

Not easy to create an little example, it’s a part of big hotel management program.
I will try, but I already send the control_app php file and his apl file generated, maybe it can help

Thanks

Email send to bug teams

Hello,

We’re checking the problem.

Thank you!

Hello

The problem is the new english name of global variables [sc_glo_servidor],[sc_glo_usuario],[sc_glo_senha],[sc_glo_banco]
Now I need to change too much app using those variables because I used ireport link for printout

Thanks SC :frowning:

1 Like