summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsalvis2011-07-03 12:19:45 (GMT)
committer salvis2011-07-03 12:19:45 (GMT)
commit6c30e76205b9c79591e377d575cf321fb1751cc1 (patch)
treee1909b353030ca025dfad9bf584edd601da5b24d
parentd438412476826a2e89e0d8da74b47c167505be16 (diff)
#1207760 by rooby: Fix warning when generating titles with a single word.
-rw-r--r--devel_generate/devel_generate.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/devel_generate/devel_generate.inc b/devel_generate/devel_generate.inc
index 2b35528..b9348ae 100644
--- a/devel_generate/devel_generate.inc
+++ b/devel_generate/devel_generate.inc
@@ -570,7 +570,8 @@ function devel_create_greeking($word_count, $title = FALSE) {
else {
// Use slightly different method for titles.
$words = array_rand($dictionary_flipped, $word_count);
- $greeking = ucwords(implode(' ', $words));
+ $words = is_array($words) ? implode(' ', $words) : $words;
+ $greeking = ucwords($words);
}
// Work around possible php garbage collection bug. Without an unset(), this