diff options
-rw-r--r-- | contributing.md | 2 | ||||
-rw-r--r-- | system/core/Common.php | 2 | ||||
-rw-r--r-- | system/core/Model.php | 4 | ||||
-rw-r--r-- | system/helpers/html_helper.php | 2 |
4 files changed, 7 insertions, 3 deletions
diff --git a/contributing.md b/contributing.md index b6d486d00..29673aa5b 100644 --- a/contributing.md +++ b/contributing.md @@ -20,7 +20,7 @@ for us to maintain quality of the code-base. ### PHP Style -All code must meet the [Style Guide](http://codeigniter.com/user_guide/general/styleguide.html), which is +All code must meet the [Style Guide](http://ellislab.com/codeigniter/user-guide/general/styleguide.html), which is essentially the [Allman indent style](http://en.wikipedia.org/wiki/Indent_style#Allman_style), underscores and readable operators. This makes certain that all code is the same format as the existing code and means it will be as readable as possible. ### Documentation diff --git a/system/core/Common.php b/system/core/Common.php index e340931b7..7f2708151 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -124,7 +124,7 @@ if ( ! function_exists('load_class')) * * @param string the class name being requested * @param string the directory where the class should be found - * @param string the class name prefix + * @param string an optional argument to pass to the class constructor * @return object */ function &load_class($class, $directory = 'libraries', $param = NULL) diff --git a/system/core/Model.php b/system/core/Model.php index 9485ec2c9..9736faa7e 100644 --- a/system/core/Model.php +++ b/system/core/Model.php @@ -59,6 +59,10 @@ class CI_Model { */ public function __get($key) { + // Debugging note: + // If you're here because you're getting an error message + // saying 'Undefined Property: system/core/Model.php', it's + // most likely a typo in your model code. return get_instance()->$key; } diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php index d8c3e6d89..e8cef37b7 100644 --- a/system/helpers/html_helper.php +++ b/system/helpers/html_helper.php @@ -292,7 +292,7 @@ if ( ! function_exists('link_tag')) } else { - if ( ! preg_match('#^([a-z]+:)?//#i', $href)) + if (preg_match('#^([a-z]+:)?//#i', $href)) { $link .= 'href="'.$href.'" '; } |