summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-09-26 23:31:36 +0000
committerDries Buytaert <dries@buytaert.net>2010-09-26 23:31:36 +0000
commit3780b17654a2af093c854f9c32bd2d6e102ec16c (patch)
tree0289b1288109ca1baecbddc7192f1cea84227e3a /includes
parent88bc80a5974a5ff6bfedf0083934e791bf7cfcd7 (diff)
downloadbrdo-3780b17654a2af093c854f9c32bd2d6e102ec16c.tar.gz
brdo-3780b17654a2af093c854f9c32bd2d6e102ec16c.tar.bz2
- Patch #921606 by munzirtaha, bleen18: various code uses is_null().
Diffstat (limited to 'includes')
-rw-r--r--includes/common.inc2
-rw-r--r--includes/file.inc6
-rw-r--r--includes/form.inc4
-rw-r--r--includes/theme.inc2
4 files changed, 7 insertions, 7 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 6611d418c..0c3851411 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -1616,7 +1616,7 @@ function format_rss_item($title, $link, $description, $args = array()) {
* Format XML elements.
*
* @param $array
- * An array where each item represent an element and is either a:
+ * An array where each item represents an element and is either a:
* - (key => value) pair (<key>value</key>)
* - Associative array with fields:
* - 'key': element name
diff --git a/includes/file.inc b/includes/file.inc
index f44a78d11..1d4343da0 100644
--- a/includes/file.inc
+++ b/includes/file.inc
@@ -2193,11 +2193,11 @@ function drupal_dirname($uri) {
* @ingroup php_wrappers
*/
function drupal_mkdir($uri, $mode = NULL, $recursive = FALSE, $context = NULL) {
- if (is_null($mode)) {
+ if (!isset($mode)) {
$mode = variable_get('file_chmod_directory', 0775);
}
- if (is_null($context)) {
+ if (!isset($context)) {
return mkdir($uri, $mode, $recursive);
}
else {
@@ -2282,7 +2282,7 @@ function drupal_tempnam($directory, $prefix) {
function file_directory_temp() {
$temporary_directory = variable_get('file_directory_temp', NULL);
- if (is_null($temporary_directory)) {
+ if (!isset($temporary_directory)) {
$directories = array();
// Has PHP been set with an upload_tmp_dir?
diff --git a/includes/form.inc b/includes/form.inc
index 5a6ccd20c..4aa536ff5 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -2096,7 +2096,7 @@ function form_type_checkboxes_value($element, $input = FALSE) {
// checkboxes to the server at all). This will not affect non-programmatic
// form submissions, since a checkbox can never legitimately be NULL.
foreach ($input as $key => $value) {
- if (is_null($value)) {
+ if (!isset($value)) {
unset($input[$key]);
}
}
@@ -4009,7 +4009,7 @@ function _batch_queue($batch_set) {
// The class autoloader is not available when running update.php, so make
// sure the files are manually included.
- if (is_null($queues)) {
+ if (!isset($queues)) {
$queues = array();
require_once DRUPAL_ROOT . '/modules/system/system.queue.inc';
require_once DRUPAL_ROOT . '/includes/batch.queue.inc';
diff --git a/includes/theme.inc b/includes/theme.inc
index 96222de71..7ce021ef0 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -1119,7 +1119,7 @@ function theme_get_setting($setting_name, $theme = NULL) {
$cache = &drupal_static(__FUNCTION__, array());
// If no key is given, use the current theme if we can determine it.
- if (is_null($theme)) {
+ if (!isset($theme)) {
$theme = !empty($GLOBALS['theme_key']) ? $GLOBALS['theme_key'] : '';
}