diff --git a/.gitignore b/.gitignore index 3920157..0ab12fe 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /.settings/ /vendor/ /composer.lock +/nbproject/ diff --git a/.travis.yml b/.travis.yml index 9927c0a..ca3fc8d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,7 +35,7 @@ install: before_script: - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi" - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi" - - sh -c "if [ '$PHPCS' = '1' ]; then composer require cakephp/cakephp-codesniffer:dev-master; fi" + - sh -c "if [ '$PHPCS' = '1' ]; then composer require cakephp/cakephp-codesniffer:3.x; fi" - sh -c "if [ '$COVERALLS' = '1' ]; then composer require --dev php-coveralls/php-coveralls; fi" - sh -c "if [ '$COVERALLS' = '1' ]; then mkdir -p build/logs; fi" diff --git a/src/Model/Behavior/WhoDidItBehavior.php b/src/Model/Behavior/WhoDidItBehavior.php index db4ceb0..1ae0099 100644 --- a/src/Model/Behavior/WhoDidItBehavior.php +++ b/src/Model/Behavior/WhoDidItBehavior.php @@ -134,6 +134,9 @@ public function beforeFind($event, $query, $options, $primary) public function beforeSave($event, $entity, $options) { $auth = Configure::read('GlobalAuth'); + if (empty($auth)) { + return; + } $id = $auth['id']; if ($entity->isNew()) {