Skip to content

Commit

Permalink
some fixes to random mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
mebjas committed Mar 17, 2018
1 parent 83bf89c commit fa2789a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions libs/csrf/csrfprotector.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
include __DIR__ ."/csrfpDefaultLogger.php"; //// Logger class
include __DIR__ ."/csrfpAction.php"; //// Actions enumerator


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

// name of HTTP POST variable for authentication
Expand Down
4 changes: 2 additions & 2 deletions test/csrfprotector_test.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
date_default_timezone_set('UTC');
include __DIR__ .'/../libs/csrf/csrfprotector.php';
include __DIR__ .'/../libs/csrf/csrfpDefaultLogger.php';
require_once __DIR__ .'/../libs/csrf/csrfprotector.php';
require_once __DIR__ .'/../libs/csrf/csrfpDefaultLogger.php';

if (intval(phpversion('tidy')) >= 7 && !class_exists('\PHPUnit_Framework_TestCase', true)) {
class_alias('\PHPUnit\Framework\TestCase', '\PHPUnit_Framework_TestCase');
Expand Down
4 changes: 2 additions & 2 deletions test/csrfprotector_test_customlogger.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
date_default_timezone_set('UTC');
include __DIR__ .'/../libs/csrf/csrfprotector.php';
include __DIR__ .'/../libs/csrf/LoggerInterface.php';
require_once __DIR__ .'/../libs/csrf/csrfprotector.php';
require_once __DIR__ .'/../libs/csrf/LoggerInterface.php';

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

0 comments on commit fa2789a

Please sign in to comment.