Bug #35200

TYPO3\FLOW3\AOP\Exception\InvalidArgumentException thrown in file JoinPoint.php

Added by Johannes K over 7 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Could have
Assignee:
Category:
Session
Start date:
2012-03-23
Due date:
% Done:

100%

PHP Version:
Has patch:
No
Complexity:

Description

In TYPO3\FLOW3\Session\Aspect\LoggingAspect , l. 68

$reason = $joinPoint->getMethodArgument('reason') ?: 'no reason given';

there should be another check like "$joinPoint->hasMethodArgument('reason')" or something like that.

The argument "reason" does not exist in method TYPO3\FLOW3\Session\PhpSession->destroy
25 TYPO3\FLOW3\AOP\JoinPoint::getMethodArgument("reason")

24 TYPO3\FLOW3\Session\Aspect\LoggingAspect_Original::logDestroy(TYPO3\FLOW3\AOP\JoinPoint)

23 TYPO3\FLOW3\AOP\Advice\AbstractAdvice::invoke(TYPO3\FLOW3\AOP\JoinPoint)

22 TYPO3\FLOW3\Session\PhpSession::destroy("Session was inactive for 72773 seconds, more than the configured timeout of 3600 seconds.")

21 TYPO3\FLOW3\Session\PhpSession_Original::autoExpire()

20 TYPO3\FLOW3\Session\PhpSession_Original::canBeResumed()

19 TYPO3\FLOW3\Session\PhpSession_Original::resume()

18 TYPO3\FLOW3\Session\PhpSession::resume()

17 call_user_func_array(array, array)

16 TYPO3\FLOW3\Session\PhpSession::FLOW3_AOP_Proxy_invokeJoinPoint(TYPO3\FLOW3\AOP\JoinPoint)

15 TYPO3\FLOW3\Session\PhpSession::resume()

14 TYPO3\FLOW3\Core\Booting\Scripts::initializeSession(TYPO3\FLOW3\Core\Bootstrap)

13 call_user_func(array, TYPO3\FLOW3\Core\Bootstrap)

12 TYPO3\FLOW3\Core\Booting\Step::__invoke(TYPO3\FLOW3\Core\Bootstrap)

11 TYPO3\FLOW3\Core\Booting\Sequence::invokeStep(TYPO3\FLOW3\Core\Booting\Step, TYPO3\FLOW3\Core\Bootstrap)

10 TYPO3\FLOW3\Core\Booting\Sequence::invokeStep(TYPO3\FLOW3\Core\Booting\Step, TYPO3\FLOW3\Core\Bootstrap)

9 TYPO3\FLOW3\Core\Booting\Sequence::invokeStep(TYPO3\FLOW3\Core\Booting\Step, TYPO3\FLOW3\Core\Bootstrap)

8 TYPO3\FLOW3\Core\Booting\Sequence::invokeStep(TYPO3\FLOW3\Core\Booting\Step, TYPO3\FLOW3\Core\Bootstrap)

7 TYPO3\FLOW3\Core\Booting\Sequence::invokeStep(TYPO3\FLOW3\Core\Booting\Step, TYPO3\FLOW3\Core\Bootstrap)

6 TYPO3\FLOW3\Core\Booting\Sequence::invokeStep(TYPO3\FLOW3\Core\Booting\Step, TYPO3\FLOW3\Core\Bootstrap)

5 TYPO3\FLOW3\Core\Booting\Sequence::invokeStep(TYPO3\FLOW3\Core\Booting\Step, TYPO3\FLOW3\Core\Bootstrap)

4 TYPO3\FLOW3\Core\Booting\Sequence::invokeStep(TYPO3\FLOW3\Core\Booting\Step, TYPO3\FLOW3\Core\Bootstrap)

3 TYPO3\FLOW3\Core\Booting\Sequence::invoke(TYPO3\FLOW3\Core\Bootstrap)

2 TYPO3\FLOW3\MVC\Web\RequestHandler::handleRequest()

1 TYPO3\FLOW3\Core\Bootstrap::run()

I can look into it later, just wanted to have it documented for the record.

Associated revisions

Revision 72466518 (diff)
Added by Johannes K over 7 years ago

[BUGFIX] Session: Do not throw an exception at logging

While logging the session destruction there was an exception thrown if
no reason was given, because getArgument() can not be called for non
existing arguments

Also added a testcase for the LoggingAspect.

Additionally removed the type hint for the proxy object in JoinPoint -
although that's correct, it imposes unnecessary hassle for testing,
like in this case.

Change-Id: Ie8c05ca5bd52e0aa430ce40684e8aedd2081675e
Fixes: #35200
Releases: 1.1

History

#1 Updated by Gerrit Code Review over 7 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9857

#2 Updated by Gerrit Code Review over 7 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9857

#3 Updated by Karsten Dambekalns over 7 years ago

  • Target version changed from 1.0.4 to 1.0.5

#4 Updated by Gerrit Code Review over 7 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9857

#5 Updated by Gerrit Code Review over 7 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9857

#6 Updated by Karsten Dambekalns over 7 years ago

  • Category changed from - Error Handler Report - to Session
  • Assignee set to Johannes K
  • Priority changed from -- undefined -- to Could have
  • Target version changed from 1.0.5 to 1.1

This does not affect 1.0, changing target version.

#7 Updated by Gerrit Code Review over 7 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9857

#8 Updated by Karsten Dambekalns over 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF