From f8fbe3793680af1dae2db2829cfc84068831c52f Mon Sep 17 00:00:00 2001 From: rxu Date: Wed, 28 Jun 2017 00:58:03 +0700 Subject: [ticket/14972] replace all occurrences of sizeof() with the count() PHPBB3-14972 --- phpBB/includes/ucp/ucp_attachments.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'phpBB/includes/ucp/ucp_attachments.php') diff --git a/phpBB/includes/ucp/ucp_attachments.php b/phpBB/includes/ucp/ucp_attachments.php index 66c3109b3d..c1b623cd71 100644 --- a/phpBB/includes/ucp/ucp_attachments.php +++ b/phpBB/includes/ucp/ucp_attachments.php @@ -38,7 +38,7 @@ class ucp_attachments $delete = (isset($_POST['delete'])) ? true : false; $delete_ids = array_keys($request->variable('attachment', array(0))); - if ($delete && sizeof($delete_ids)) + if ($delete && count($delete_ids)) { // Validate $delete_ids... $sql = 'SELECT attach_id @@ -56,7 +56,7 @@ class ucp_attachments $db->sql_freeresult($result); } - if ($delete && sizeof($delete_ids)) + if ($delete && count($delete_ids)) { $s_hidden_fields = array( 'delete' => 1 @@ -75,12 +75,12 @@ class ucp_attachments unset($attachment_manager); meta_refresh(3, $this->u_action); - $message = ((sizeof($delete_ids) == 1) ? $user->lang['ATTACHMENT_DELETED'] : $user->lang['ATTACHMENTS_DELETED']) . '

' . sprintf($user->lang['RETURN_UCP'], '', ''); + $message = ((count($delete_ids) == 1) ? $user->lang['ATTACHMENT_DELETED'] : $user->lang['ATTACHMENTS_DELETED']) . '

' . sprintf($user->lang['RETURN_UCP'], '', ''); trigger_error($message); } else { - confirm_box(false, (sizeof($delete_ids) == 1) ? 'DELETE_ATTACHMENT' : 'DELETE_ATTACHMENTS', build_hidden_fields($s_hidden_fields)); + confirm_box(false, (count($delete_ids) == 1) ? 'DELETE_ATTACHMENT' : 'DELETE_ATTACHMENTS', build_hidden_fields($s_hidden_fields)); } } -- cgit v1.2.1