copyright and version fixes
[civicrm-core.git] / CRM / PCP / Form / Campaign.php
index 197fe5053e099af17987cece63f2957530c42cc7..a3058f8e84ab1bc3bc066820a250eca656543d0e 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
  *
  */
@@ -165,9 +165,7 @@ class CRM_PCP_Form_Campaign extends CRM_Core_Form {
     if (strlen($fields['donate_link_text']) >= 64) {
       $errors['donate_link_text'] = ts('Button Text must be less than 64 characters.');
     }
-    if (isset($files['attachFile_1']) &&
-      CRM_Utils_Array::value('tmp_name', $files['attachFile_1'])
-    ) {
+    if (isset($files['attachFile_1']) && !empty($files['attachFile_1']['tmp_name'])) {
       list($width, $height) = getimagesize($files['attachFile_1']['tmp_name']);
       if ($width > 360 || $height > 360) {
         $errors['attachFile_1'] = ts('Your picture or image file cannot be larger than 360 x 360 pixels in size.') . ' ' . ts("The dimensions of the image you have selected are %1 x %2.", array(1 => $width, 2 => $height)) . ' ' . ts('Please shrink or crop the file or find another smaller image and try again.');