-
Notifications
You must be signed in to change notification settings - Fork 92
Mono/Linux Improvements #25
base: master
Are you sure you want to change the base?
Conversation
UtcToUnixTimeStamp was throwing "System.ArgumentException: dateTime parameter is an invalid time" for mktime(0,0,0,10,10,2010)
Mono + Apache|XSP don't set the working directory, thus new FullPath() converts "bin" to "//bin" (mono 2.10.9) or "/bin".
- Added PHP_OS (necessary for other commited patches) - Fixed absolute-path-includes
very nice, I'll check the code and merge with master |
} | ||
catch (Exception e) | ||
{ | ||
// IX: Was throwing "System.ArgumentException: dateTime parameter is an invalid time" for mktime(0,0,0,10,10,2010) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it is failing for specific input argument, do not try/catch everything, just take care of the input argument (if ... then ...)
Conflicts: Source/Core/Compiler/AST/DirectVariableUse.cs Source/Core/Configuration.CLR.cs Source/ExtSupport/PHP4/glob.cpp
Agreed. try catch in production code is usually never a good thing. |
Could this be cherry-picked into current master? Things like proper PHP_OS value are useful, and that particular commit (kripper/Phalanger@4cb8a0c) applies cleanly even if the rest do not. |
Regarding catching specific exceptions, I prefer this PHP function to not throw stack traces by default. We have been using Phalanger with Mono/Linux in production for big gov sites for over a year. In our case, throwing unmanaged exceptions didn't sound as the best option. We prefer to just return NULL instead. Besides, original PHP functions don't crash that way either on invalid dates. Please cherry-pick or accept handling all exceptions by default. |
No description provided.