Restoring the error handler

Restoring the error handler even if an exception occurs. 
This is something we have to do manually if we catch the Exception somewhere else.
Restoring the error handler

Restoring the error handler no matter what the exception is instead
Update library/Zend/Config/Writer/AbstractWriter.php

Syntax changes
[#3376] Better fix

- The main point is that we ensure hasItems() internally calls
  internalHasItem(). As such, removing the multiple keys ensures we
  don't have issues with index order of mock objects. Test now passes on
  both 3.7.12 and 3.7.13, on all PHP versions used.
Merge branch 'hotfix/3376'

Backport #3436 to master
Updated session manager to register_shutdown_function rather than a destructor

- Fixed an issue where an exception was not properly defined in use
- Fixed a flash messenger test by clearing session storage on teardown
- Removed a no longer valid test on sessionmanagertest

Conflicts:
	library/Zend/Session/Storage/SessionArrayStorage.php
Allow injecting session manager into PRG plugin

- which allows creating the internally used Container with the specified
  session manager
- neither FM and PRG should instantiate a SessionManager directly; they
  should use the default manager from the Container class
CS cleanup of PRG plugin

- Created docblock for __invoke() method
- Removed an else condition that would not be hit if the if condition is
  evaluated.
Fix issue with imports

- An import of "use Zend\Session\Storage\StorageInterface as Storage" caused a
  subsequent, existing check of "instanceof Storage\StorageInterface" to thus
  fail. Removed all imports for classes in the same namespace to fix the issue.
Merge pull request #3452 branch 'hotfix/session-mutability'
Forward #3452

Conflicts:
	library/Zend/Mvc/Controller/Plugin/PostRedirectGet.php
stdClass with little 's'
Merge pull request #3460 branch 'hotfix/stdClass-name'
Forward #3460
fix for zendframework/zf2#3458
Fix #3289: Variable changed
Merge branch 'hotfix/3458' of git://github.com/netiul/zf2 into hotfix/3461
[#3461] CS fixes

- Trailing whitespace
[#3461] PHPUnit test fix

- $_SESSION is not always present from CLI and/or PHPUnit; check to see
  if it exists before using it. This prevents:
    - notice (undefined variable)
    - catchable fatal error (toArray returning null, which is then
      passed to fromArray() which expects an array)
Merge branch 'hotfix/3461' into develop

Close #3461