Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-07-22 02:47:20 +0400
committerRobin Appelman <icewind1991@gmail.com>2011-07-22 02:47:20 +0400
commit9d1c5c855bb1e5708d46960b3ad08acd805a6186 (patch)
tree0c1816d1c490c8710684d40604d9df42b7469101 /index.php
parent828a26c69ee3a4920c35265e972e759ed800a461 (diff)
fix warning if no username is set in the cookie
Diffstat (limited to 'index.php')
-rw-r--r--index.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/index.php b/index.php
index 2e2d495fda6..dfd75492709 100644
--- a/index.php
+++ b/index.php
@@ -69,14 +69,22 @@ elseif(isset($_POST["user"])) {
exit();
}
else {
- OC_TEMPLATE::printGuestPage("", "login", array("error" => true, "username" => $_COOKIE["username"]));
+ if(isset($_COOKIE["username"])){
+ OC_TEMPLATE::printGuestPage("", "login", array("error" => true, "username" => $_COOKIE["username"]));
+ }else{
+ OC_TEMPLATE::printGuestPage("", "login", array("error" => true));
+ }
}
}
// For all others cases, we display the guest page :
else {
OC_APP::loadApps();
- OC_TEMPLATE::printGuestPage("", "login", array("error" => false, "username" => $_COOKIE["username"]));
+ if(isset($_COOKIE["username"])){
+ OC_TEMPLATE::printGuestPage("", "login", array("error" => false, "username" => $_COOKIE["username"]));
+ }else{
+ OC_TEMPLATE::printGuestPage("", "login", array("error" => false));
+ }
}
?> \ No newline at end of file