]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/class-wp-error.php
WordPress 4.6.3-scripts
[autoinstalls/wordpress.git] / wp-includes / class-wp-error.php
index c1b07ab6374a5efa935c0329a5a3fc1c20f5a3ca..1010adb047e6ac4bf8770befbee5e957ad3033b4 100644 (file)
@@ -11,8 +11,8 @@
  * WordPress Error class.
  *
  * Container for checking for WordPress errors and error messages. Return
- * WP_Error and use {@link is_wp_error()} to check if this class is returned.
- * Many core WordPress functions pass this class in the event of an error and
+ * WP_Error and use is_wp_error() to check if this class is returned. Many
+ * core WordPress functions pass this class in the event of an error and
  * if not handled properly will result in code errors.
  *
  * @package WordPress
@@ -144,7 +144,7 @@ class WP_Error {
         * @since 2.1.0
         *
         * @param string|int $code Optional. Error code.
-        * @return mixed Null, if no errors.
+        * @return mixed Error data, if it exists.
         */
        public function get_error_data($code = '') {
                if ( empty($code) )
@@ -152,7 +152,6 @@ class WP_Error {
 
                if ( isset($this->error_data[$code]) )
                        return $this->error_data[$code];
-               return null;
        }
 
        /**