Merge pull request #2261 from nisheeth-barthwal/develop

Fixed Issue #2239
diff --git a/.travis.yml b/.travis.yml
index 070b23c..ab0aa56 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -14,8 +14,7 @@
   - DB=pdo/sqlite
 
 before_script:
-  - curl -s http://getcomposer.org/installer | php
-  - php composer.phar install
+  - composer install --dev --no-progress
   - sh -c "if [ '$DB' = 'pgsql' ] || [ '$DB' = 'pdo/pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS ci_test;' -U postgres; fi"
   - sh -c "if [ '$DB' = 'pgsql' ] || [ '$DB' = 'pdo/pgsql' ]; then psql -c 'create database ci_test;' -U postgres; fi"
   - sh -c "if [ '$DB' = 'mysql' ] || [ '$DB' = 'mysqli' ] || [ '$DB' = 'pdo/mysql' ]; then mysql -e 'create database IF NOT EXISTS ci_test;'; fi"
diff --git a/composer.json b/composer.json
index 7d60020..e21aaed 100644
--- a/composer.json
+++ b/composer.json
@@ -1,8 +1,9 @@
 {
+    "name" : "ellislab/codeigniter",
     "require": {
-        "mikey179/vfsStream": "*"
+        "php": ">=5.2.4"
     },
     "require-dev": {
-		"phpunit/phpunit": "*"
-	}
+      "mikey179/vfsStream": "*"
+		}
 }
\ No newline at end of file
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index d6e3e85..692909c 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -228,7 +228,7 @@
 	 */
 	function form_upload($data = '', $value = '', $extra = '')
 	{
-		$default = array('type' => 'file', 'name' => '');
+		$defaults = array('type' => 'file', 'name' => '');
 		is_array($data) OR $data = array('name' => $data);
 		$data['type'] = 'file';
 		return '<input '._parse_form_attributes($data, $defaults).$extra." />\n";
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index 0319ac5..daa3848 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -94,7 +94,7 @@
 	 * @var	int
 	 */
 	public $smtp_timeout	= 5;
-	
+
 	/**
 	 * SMTP persistent connection
 	 *
@@ -408,7 +408,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Destructor - Releases Resources
 	 *
@@ -2021,7 +2021,7 @@
 		{
 			return TRUE;
 		}
-			
+
 		if (strpos($reply, '334') !== 0)
 		{
 			$this->_set_error_message('lang:email_failed_smtp_login', $reply);
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index acd76b0..1c14f99 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -1212,7 +1212,7 @@
 		 * Notes:
 		 *	- the DIRECTORY_SEPARATOR comparison ensures that we're not on a Windows system
 		 *	- many system admins would disable the exec(), shell_exec(), popen() and similar functions
-		 *	  due to security concerns, hence the function_exists() checks
+		 *	  due to security concerns, hence the function_usable() checks
 		 */
 		if (DIRECTORY_SEPARATOR !== '\\')
 		{
@@ -1223,7 +1223,7 @@
 			if (function_usable('exec'))
 			{
 				/* This might look confusing, as $mime is being populated with all of the output when set in the second parameter.
-				 * However, we only neeed the last line, which is the actual return value of exec(), and as such - it overwrites
+				 * However, we only need the last line, which is the actual return value of exec(), and as such - it overwrites
 				 * anything that could already be set for $mime previously. This effectively makes the second parameter a dummy
 				 * value, which is only put to allow us to get the return status code.
 				 */
diff --git a/tests/codeigniter/helpers/form_helper_test.php b/tests/codeigniter/helpers/form_helper_test.php
index 8916527..e234f9c 100644
--- a/tests/codeigniter/helpers/form_helper_test.php
+++ b/tests/codeigniter/helpers/form_helper_test.php
@@ -58,7 +58,7 @@
 	public function test_form_upload()
 	{
 		$expected = <<<EOH
-<input type="file" name="attachment" value=""  />
+<input type="file" name="attachment"  />
 
 EOH;
 
diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst
index a3ea01d..02841ab 100644
--- a/user_guide_src/source/installation/upgrade_300.rst
+++ b/user_guide_src/source/installation/upgrade_300.rst
@@ -1,5 +1,5 @@
 #############################
-Upgrading from 2.1.2 to 3.0.0
+Upgrading from 2.1.3 to 3.0.0
 #############################
 
 .. note:: These upgrade notes are for a version that is yet to be released.
@@ -104,9 +104,9 @@
 	(.+)	// matches ANYTHING
 	(:any)	// matches any character, except for '/'
 
-*******************************************
-Step 9: Update your librararies' file names
-*******************************************
+*****************************************
+Step 9: Update your libraries' file names
+*****************************************
 
 CodeIgniter 3.0 only allows library file names to be named in a *ucfirst* manner
 (meaning that the first letter of the class name must be a capital). For example,
@@ -136,8 +136,15 @@
 The default return value of these functions, when the required elements
 don't exist, has been changed from FALSE to NULL.
 
+***********************************************************************
+Step 11: Check the calls to Directory Helper's directory_map() function
+***********************************************************************
+
+In the resulting array, directories now end with a trailing directory
+separator (i.e. a slash, usually).
+
 *************************************************************
-Step 11: Update usage of Database Forge's drop_table() method
+Step 12: Update usage of Database Forge's drop_table() method
 *************************************************************
 
 Up until now, ``drop_table()`` added an IF EXISTS clause by default or it didn't work
@@ -159,7 +166,7 @@
 	all drivers with the exception of ODBC.
 
 ***********************************************************
-Step 12: Change usage of Email library with multiple emails
+Step 13: Change usage of Email library with multiple emails
 ***********************************************************
 
 The :doc:`Email Library <../libraries/email>` will automatically clear the
@@ -174,7 +181,7 @@
  	}
 
 ***************************************************
-Step 13: Update your Form_validation language lines
+Step 14: Update your Form_validation language lines
 ***************************************************
 
 Two improvements have been made to the :doc:`Form Validation Library
@@ -205,7 +212,7 @@
 	later.
 
 ****************************************************************
-Step 14: Remove usage of (previously) deprecated functionalities
+Step 15: Remove usage of (previously) deprecated functionalities
 ****************************************************************
 
 In addition to the ``$autoload['core']`` configuration setting, there's a
@@ -238,7 +245,7 @@
 :doc:`Security Helper <../helpers/security_helper>` function ``do_hash()`` is now just an alias for
 PHP's native ``hash()`` function. It is deprecated and scheduled for removal in CodeIgniter 3.1+.
 
-.. note:: This function is still available, but you're strongly encouraged to remove it's usage sooner
+.. note:: This function is still available, but you're strongly encouraged to remove its usage sooner
 	rather than later.
 
 File helper read_file()
@@ -248,7 +255,7 @@
 PHP's native ``file_get_contents()`` function. It is deprecated and scheduled for removal in
 CodeIgniter 3.1+.
 
-.. note:: This function is still available, but you're strongly encouraged to remove it's usage sooner
+.. note:: This function is still available, but you're strongly encouraged to remove its usage sooner
 	rather than later.
 
 String helper repeater()
@@ -257,7 +264,7 @@
 :doc:`String Helper <../helpers/string_helper>` function :php:func:`repeater()` is now just an alias for
 PHP's native ``str_repeat()`` function. It is deprecated and scheduled for removal in CodeIgniter 3.1+.
 
-.. note:: This function is still available, but you're strongly encouraged to remove it's usage sooner
+.. note:: This function is still available, but you're strongly encouraged to remove its usage sooner
 	rather than later.
 
 String helper trim_slashes()
@@ -267,7 +274,7 @@
 for PHP's native ``trim()`` function (with a slash passed as its second argument). It is deprecated and
 scheduled for removal in CodeIgniter 3.1+.
 
-.. note:: This function is still available, but you're strongly encouraged to remove it's usage sooner
+.. note:: This function is still available, but you're strongly encouraged to remove its usage sooner
 	rather than later.
 
 Email helper functions
@@ -292,7 +299,7 @@
 to the availability of native PHP `constants <http://www.php.net/manual/en/class.datetime.php#datetime.constants.types>`_,
 which when combined with ``date()`` provide the same functionality. Furthermore, they have the
 exact same names as the ones supported by ``standard_date()``. Here are examples of how to replace
-it's usage:
+its usage:
 
 ::
 
@@ -308,7 +315,7 @@
 	// Replacement
 	date(DATE_ATOM, $time);
 
-.. note:: This function is still available, but you're strongly encouraged to remove its' usage sooner
+.. note:: This function is still available, but you're strongly encouraged to remove its usage sooner
 	rather than later as it is scheduled for removal in CodeIgniter 3.1+.
 
 Pagination library 'anchor_class' setting
@@ -320,7 +327,7 @@
 As a result of that, the 'anchor_class' setting is now deprecated and scheduled for removal in
 CodeIgniter 3.1+.
 
-.. note:: This setting is still available, but you're strongly encouraged to remove its' usage sooner
+.. note:: This setting is still available, but you're strongly encouraged to remove its usage sooner
 	rather than later.
 
 String helper random_string() types 'unique' and 'encrypt'