Undefined index: _SWIFT_LOG [includes/swift/Swift/LogContainer.php, line 42]
Looking at the code, I can't understand why $GLOBALS["_SWIFT_LOG"] is not defined, as you give it a value of null at the top of the page. I have a feeling it might be something to do with php.ini configuration, as I only get the error on my test server, and not my development server. All errors are enabled on both.
Very odd. Unless you have some whacky code somewhere before Swift gets used which empties the $GLOBALS array I can't see why you'd get that. I doubt you can turn the $GLOBALS array off neither
Not sure what else to suggest other than changing the code to use the "global" keyword rather than the $GLOBALS array.
I had the same error message and found it occurred because I was running the php4 version of Swift Mail under php5.
The Swift_Connection_SMTP class has a __destruct() method (which wouldn't normally be called under php 4). The destructor calls stop() which logs the closure, and we then have an error message about an undefined global in logContainer because by now all the globals have been destroyed.
bronwen wrote:I had the same error message and found it occurred because I was running the php4 version of Swift Mail under php5.
The Swift_Connection_SMTP class has a __destruct() method (which wouldn't normally be called under php 4). The destructor calls stop() which logs the closure, and we then have an error message about an undefined global in logContainer because by now all the globals have been destroyed.
Just in case anyone else has the same problem.
Well spotted, and thanks for sharing This will indeed be the problem due to the timing at which __destruct() runs.