From 4c7c74afc2b65553986502af0c50b1a4417f5e38 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 8 Oct 2014 17:15:05 -0700 Subject: [PATCH] Added another size limit check to Job::toString Change-Id: I5a6e94eb98769b33d0ea44273d0eee8ee669dd17 --- includes/jobqueue/Job.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/includes/jobqueue/Job.php b/includes/jobqueue/Job.php index d89c5d2960..e049303628 100644 --- a/includes/jobqueue/Job.php +++ b/includes/jobqueue/Job.php @@ -315,7 +315,7 @@ abstract class Job implements IJobSpecification { break; } } - if ( $filteredValue ) { + if ( $filteredValue && count( $filteredValue ) < 10 ) { $value = FormatJson::encode( $filteredValue ); } else { $value = "array(" . count( $value ) . ")"; @@ -329,15 +329,15 @@ abstract class Job implements IJobSpecification { } if ( is_object( $this->title ) ) { - $s = "{$this->command} " . $this->title->getPrefixedDBkey(); + $s = "{$this->command} {$this->title->getPrefixedDBkey()}"; if ( $paramString !== '' ) { - $s .= ' ' . $paramString; + $s .= " $paramString"; } - - return $s; } else { - return "{$this->command} $paramString"; + $s = "{$this->command} $paramString"; } + + return $s; } protected function setLastError( $error ) { -- 2.20.1