upgraded php - now endless undefined variable warnings

Joined
12 Feb 2006
Posts
17,311
Location
Surrey
just upgraded my desktop and installed xampp which i guess comes with a later version of php than what i had previously used.

unfortunately i'm now shown with an endless list of undefined variable warnings.

everything works fine, however it's too much to ignore when trying to work on the site.

i've reduced what warnings i see, but i'm also seeing other issues like " A non-numeric value encountered" when trying to multiply a variable that's not been defined as anything yet, plus i'd prefer to see warnings as much as possible.

so i'm wondering what's best to do now?

do i really need to go through every page and define every single freaking variable before it's used?

there are situations where i have something like the following:

if x==1 then y = 2,

if a==1 then b = 3

then i have b+y+z = and the total displayed, but as sometimes x or a doesn't equal 1 then y or b wont be set as anything. this is of course causing a warning now but still works with no issues
 
Back
Top Bottom