Skip to content

Commit fa2789a

Browse files
committed
some fixes to random mistake
1 parent 83bf89c commit fa2789a

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

libs/csrf/csrfprotector.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
include __DIR__ ."/csrfpDefaultLogger.php"; //// Logger class
44
include __DIR__ ."/csrfpAction.php"; //// Actions enumerator
55

6-
76
if (!defined('__CSRF_PROTECTOR__')) {
8-
self::refreshToken(); //refresh token for successful validation
97
define('__CSRF_PROTECTOR__', true); // to avoid multiple declaration errors
108

119
// name of HTTP POST variable for authentication

test/csrfprotector_test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
date_default_timezone_set('UTC');
3-
include __DIR__ .'/../libs/csrf/csrfprotector.php';
4-
include __DIR__ .'/../libs/csrf/csrfpDefaultLogger.php';
3+
require_once __DIR__ .'/../libs/csrf/csrfprotector.php';
4+
require_once __DIR__ .'/../libs/csrf/csrfpDefaultLogger.php';
55

66
if (intval(phpversion('tidy')) >= 7 && !class_exists('\PHPUnit_Framework_TestCase', true)) {
77
class_alias('\PHPUnit\Framework\TestCase', '\PHPUnit_Framework_TestCase');

test/csrfprotector_test_customlogger.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
date_default_timezone_set('UTC');
3-
include __DIR__ .'/../libs/csrf/csrfprotector.php';
4-
include __DIR__ .'/../libs/csrf/LoggerInterface.php';
3+
require_once __DIR__ .'/../libs/csrf/csrfprotector.php';
4+
require_once __DIR__ .'/../libs/csrf/LoggerInterface.php';
55

66
if (intval(phpversion('tidy')) >= 7 && !class_exists('\PHPUnit_Framework_TestCase', true)) {
77
class_alias('\PHPUnit\Framework\TestCase', '\PHPUnit_Framework_TestCase');

0 commit comments

Comments
 (0)