diff --git a/phpBB/phpbb/console/command/fixup/update_hashes.php b/phpBB/phpbb/console/command/fixup/update_hashes.php index d12d0e755d..05bef48c92 100644 --- a/phpBB/phpbb/console/command/fixup/update_hashes.php +++ b/phpBB/phpbb/console/command/fixup/update_hashes.php @@ -101,7 +101,7 @@ class update_hashes extends \phpbb\console\command\command while ($row = $this->db->sql_fetchrow($result)) { $old_hash = preg_replace('/^\$CP\$/', '', $row['user_password']); - $new_hash = $this->passwords_manager->hash($old_hash, array($this->default_type)); + $new_hash = $this->passwords_manager->hash($old_hash, [$this->default_type]); $sql = 'UPDATE ' . USERS_TABLE . " SET user_password = '" . $this->db->sql_escape($new_hash) . "' diff --git a/phpBB/phpbb/cron/manager.php b/phpBB/phpbb/cron/manager.php index f412ab85eb..8a64acc4a5 100644 --- a/phpBB/phpbb/cron/manager.php +++ b/phpBB/phpbb/cron/manager.php @@ -164,7 +164,7 @@ class manager * Web runner uses this method to resolve names to tasks. * * @param string $name Name of the task to look up. - * @return wrapper A wrapped task corresponding to the given name, or null. + * @return wrapper|null A wrapped task corresponding to the given name, or null. */ public function find_task($name) { diff --git a/phpBB/phpbb/cron/task/core/prune_shadow_topics.php b/phpBB/phpbb/cron/task/core/prune_shadow_topics.php index 0ab59f9ed5..81873a673b 100644 --- a/phpBB/phpbb/cron/task/core/prune_shadow_topics.php +++ b/phpBB/phpbb/cron/task/core/prune_shadow_topics.php @@ -166,7 +166,8 @@ class prune_shadow_topics extends \phpbb\cron\task\base implements \phpbb\cron\t * @param int $prune_flags Prune flags * @param int $prune_days Prune date in days * @param int $prune_freq Prune frequency - * @return null + * + * @return void */ protected function auto_prune_shadow_topics($forum_id, $prune_mode, $prune_flags, $prune_days, $prune_freq) { @@ -194,7 +195,5 @@ class prune_shadow_topics extends \phpbb\cron\task\base implements \phpbb\cron\t $this->log->add('admin', $user_id, $user_ip, 'LOG_PRUNE_SHADOW', false, array($row['forum_name'])); } - - return; } } diff --git a/phpBB/phpbb/cron/task/core/update_hashes.php b/phpBB/phpbb/cron/task/core/update_hashes.php index 3348a4576e..61ed0d0501 100644 --- a/phpBB/phpbb/cron/task/core/update_hashes.php +++ b/phpBB/phpbb/cron/task/core/update_hashes.php @@ -107,7 +107,7 @@ class update_hashes extends \phpbb\cron\task\base while ($row = $this->db->sql_fetchrow($result)) { $old_hash = preg_replace('/^\$CP\$/', '', $row['user_password']); - $new_hash = $this->passwords_manager->hash($old_hash, array($this->default_type)); + $new_hash = $this->passwords_manager->hash($old_hash, [$this->default_type]); // Increase number so we know that users were selected from the database $affected_rows++; diff --git a/phpBB/phpbb/cron/task/wrapper.php b/phpBB/phpbb/cron/task/wrapper.php index 52fd5e4368..1eb5db6067 100644 --- a/phpBB/phpbb/cron/task/wrapper.php +++ b/phpBB/phpbb/cron/task/wrapper.php @@ -91,7 +91,7 @@ class wrapper { $params = []; $params['cron_type'] = $this->get_name(); - if ($this->is_parametrized()) + if ($this->task instanceof parametrized) { $params = array_merge($params, $this->task->get_parameters()); } @@ -113,7 +113,7 @@ class wrapper $this->template->assign_var('CRON_TASK_URL', $this->get_url()); - return $this->template->assign_display('cron_html_tag'); + return (string) $this->template->assign_display('cron_html_tag'); } /** diff --git a/phpBB/phpbb/passwords/manager.php b/phpBB/phpbb/passwords/manager.php index 33d7196d22..aa79150aee 100644 --- a/phpBB/phpbb/passwords/manager.php +++ b/phpBB/phpbb/passwords/manager.php @@ -206,8 +206,8 @@ class manager * Hash supplied password * * @param string $password Password that should be hashed - * @param string $type Hash type. Will default to standard hash type if - * none is supplied + * @param string|array $type Hash type. Will default to standard hash type if + * none is supplied, array for combined hashing * @return string|bool Password hash of supplied password or false if * if something went wrong during hashing */