- Patch #1279680 by cam8001: watchdog() does not type its array arguments.
parent
34e4ef4811
commit
de5718848b
|
@ -42,7 +42,7 @@ const MAINTENANCE_MODE = 'update';
|
|||
*/
|
||||
function authorize_access_denied_page() {
|
||||
drupal_add_http_header('Status', '403 Forbidden');
|
||||
watchdog('access denied', 'authorize.php', NULL, WATCHDOG_WARNING);
|
||||
watchdog('access denied', 'authorize.php', array(), WATCHDOG_WARNING);
|
||||
drupal_set_title('Access denied');
|
||||
return t('You are not allowed to access this page.');
|
||||
}
|
||||
|
|
|
@ -1657,9 +1657,8 @@ function watchdog_exception($type, Exception $exception, $message = NULL, $varia
|
|||
* the variables argument to declare the value of the placeholders.
|
||||
* See t() for documentation on how $message and $variables interact.
|
||||
* @param $variables
|
||||
* Array of variables to replace in the message on display or
|
||||
* NULL if message is already translated or not possible to
|
||||
* translate.
|
||||
* Array of variables to replace in the message on display or array() if
|
||||
* message is already translated or not possible to translate.
|
||||
* @param $severity
|
||||
* The severity of the message; one of the following values as defined in
|
||||
* @link http://www.faqs.org/rfcs/rfc3164.html RFC 3164: @endlink
|
||||
|
@ -1677,7 +1676,7 @@ function watchdog_exception($type, Exception $exception, $message = NULL, $varia
|
|||
* @see watchdog_severity_levels()
|
||||
* @see hook_watchdog()
|
||||
*/
|
||||
function watchdog($type, $message, $variables = array(), $severity = WATCHDOG_NOTICE, $link = NULL) {
|
||||
function watchdog($type, $message, array $variables = array(), $severity = WATCHDOG_NOTICE, $link = NULL) {
|
||||
global $user, $base_root;
|
||||
|
||||
static $in_error_state = FALSE;
|
||||
|
|
|
@ -100,7 +100,7 @@ class ExceptionController extends ContainerAware {
|
|||
*/
|
||||
public function on403Html(FlattenException $exception, Request $request) {
|
||||
$system_path = $request->attributes->get('system_path');
|
||||
watchdog('access denied', $system_path, NULL, WATCHDOG_WARNING);
|
||||
watchdog('access denied', $system_path, array(), WATCHDOG_WARNING);
|
||||
|
||||
$path = drupal_get_normal_path(config('system.site')->get('page.403'));
|
||||
if ($path && $path != $system_path) {
|
||||
|
@ -155,7 +155,7 @@ class ExceptionController extends ContainerAware {
|
|||
* The request object that triggered this exception.
|
||||
*/
|
||||
public function on404Html(FlattenException $exception, Request $request) {
|
||||
watchdog('page not found', check_plain($request->attributes->get('system_path')), NULL, WATCHDOG_WARNING);
|
||||
watchdog('page not found', check_plain($request->attributes->get('system_path')), array(), WATCHDOG_WARNING);
|
||||
|
||||
// Check for and return a fast 404 page if configured.
|
||||
// @todo Inline this rather than using a function.
|
||||
|
|
|
@ -37,7 +37,7 @@ class PagerTest extends WebTestBase {
|
|||
|
||||
// Insert 300 log messages.
|
||||
for ($i = 0; $i < 300; $i++) {
|
||||
watchdog('pager_test', $this->randomString(), NULL, WATCHDOG_DEBUG);
|
||||
watchdog('pager_test', $this->randomString(), array(), WATCHDOG_DEBUG);
|
||||
}
|
||||
|
||||
$this->admin_user = $this->drupalCreateUser(array(
|
||||
|
|
|
@ -273,7 +273,7 @@ function update_info_page() {
|
|||
|
||||
function update_access_denied_page() {
|
||||
drupal_add_http_header('Status', '403 Forbidden');
|
||||
watchdog('access denied', 'update.php', NULL, WATCHDOG_WARNING);
|
||||
watchdog('access denied', 'update.php', array(), WATCHDOG_WARNING);
|
||||
drupal_set_title('Access denied');
|
||||
return '<p>Access denied. You are not authorized to access this page. Log in using either an account with the <em>administer software updates</em> permission or the site maintenance account (the account you created during installation). If you cannot log in, you will have to edit <code>settings.php</code> to bypass this access check. To do this:</p>
|
||||
<ol>
|
||||
|
|
Loading…
Reference in New Issue