Skip to content
This repository has been archived by the owner on Oct 23, 2019. It is now read-only.

Mono/Linux Improvements #25

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Mono/Linux Improvements #25

wants to merge 10 commits into from

Conversation

kripper
Copy link

@kripper kripper commented Feb 10, 2014

No description provided.

J. Christopher Pereira added 8 commits February 9, 2014 23:08
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
@jakubmisek
Copy link
Member

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)
Copy link
Member

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 ...)

J. Christopher Pereira added 2 commits May 11, 2014 15:20
Conflicts:
	Source/Core/Compiler/AST/DirectVariableUse.cs
	Source/Core/Configuration.CLR.cs
	Source/ExtSupport/PHP4/glob.cpp
@robertleeplummerjr
Copy link
Contributor

Agreed. try catch in production code is usually never a good thing.

@weirdan
Copy link
Contributor

weirdan commented Dec 30, 2015

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.

@kripper
Copy link
Author

kripper commented Dec 30, 2015

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.
Remember perfection is enemy of good.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants