diff --git a/apps/files_sharing/templates/authenticate.php b/apps/files_sharing/templates/authenticate.php
index fa03f41913060540c4da710336436b4f2adefa9b..2c89b5df3f6a5a90a4d99bb618d534225cf3fb2d 100644
--- a/apps/files_sharing/templates/authenticate.php
+++ b/apps/files_sharing/templates/authenticate.php
@@ -1,6 +1,6 @@
 <form action="<?php p($_['URL']); ?>" method="post">
 	<fieldset>
-		<?php if ($_['wrongpw']): ?>
+		<?php if (isset($_['wrongpw'])): ?>
 		<div class="warning"><?php p($l->t('The password is wrong. Try again.')); ?></div>
 		<?php endif; ?>
 		<p class="infield">