]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fixed array syntax to work with PHP 5.3
authorVincent Petry <pvince81@owncloud.com>
Fri, 4 Oct 2013 12:28:11 +0000 (14:28 +0200)
committerVincent Petry <pvince81@owncloud.com>
Fri, 4 Oct 2013 12:28:11 +0000 (14:28 +0200)
It seems that array brackets are only supported starting with PHP 5.4.
Fixed the array brackets to be compatible and not cause a syntax error
in PHP 5.3.

core/ajax/share.php

index ed9cbfd109a3513a4b744252a19c2394939141ca..1166ea3198a2d4688151516cbe56c50f4c481219 100644 (file)
@@ -104,7 +104,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
                        }
 
                        // don't send a mail to the user who shared the file
-                       $recipientList = array_diff($recipientList, [\OCP\User::getUser()]);
+                       $recipientList = array_diff($recipientList, array(\OCP\User::getUser()));
 
                        // send mail to all recipients with an email address
                        foreach ($recipientList as $recipient) {