Jump to content

What does this error mean?


EchoFool

Recommended Posts

Error Level: 8

Error Message: Undefined index:  register

Error File: index.php

Error Line: 114

Error Context: Array

 

The line 114 is: 

if($_GET){}else{   echo hi; }

 

I thought this was perfectly fine syntax to check if a GET of any kind is set yet i get this error in my logs which is very odd.

 

Any ideas?

           

Link to comment
https://forums.phpfreaks.com/topic/212555-what-does-this-error-mean/
Share on other sites

You sure this is line 114 from index.php?

if($_GET){}else{   echo hi; }

I see no point in having that line of code as the $_GET superglobal variable will always be defined as an empty array, whether there isn't any query string variables being passed to the script.

Well the idea is to hide a DIV when any type of GET is set and it does work according to the page - the div hides when any GET is set but then this error occured at the same time even though it worked.

 

Would the isset work ? Or would that require a specific GET['name'] because of again the array issue?

 

And yes that is currently the test script - stuff before the line 114 is html output stuff

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.