Skip to content

ext/intl: IntlDateFormatter class removing redundant error message info. #13465

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 21, 2024

Conversation

devnexen
Copy link
Member

Also correcting new IntlChar class constants typos.

Also correcting new IntlChar class constants typos.
Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, notes for future changes.

Comment on lines 181 to 185
} else {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"intltz_create_enumeration: invalid argument type", 0);
"invalid argument type", 0);
RETURN_FALSE;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels like it should be a TypeError, something to remember as future improvements

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this looks like it should just use Fast ZPP with a int|string type check.

Comment on lines 85 to 90
if (!tzobj->initialized) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"intltz_from_date_time_zone: DateTimeZone object is unconstructed",
"DateTimeZone object is unconstructed",
0);
RETURN_NULL();
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, this should probably an Error as uninitialized objects means something BAD happened.

Comment on lines 61 to 65
/** @cvalue UCHAR_ID_COMPAT_MATH_START */
public const int PROPERTY_ID_COMPT_MATH_START = UNKNOWN;
public const int PROPERTY_ID_COMPAT_MATH_START = UNKNOWN;
/** @cvalue UCHAR_ID_COMPAT_MATH_CONTINUE */
public const int PROPERTY_ID_COMPT_MATH_CONTINUE = UNKNOWN;
public const int PROPERTY_ID_COMPAT_MATH_CONTINUE = UNKNOWN;
#endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these new constants?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to merge then :D

@devnexen devnexen merged commit 9a3a4b5 into php:master Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants