@@ -60,7 +60,7 @@ U_CFUNC PHP_FUNCTION(intltz_create_time_zone)
60
60
UnicodeString id = UnicodeString ();
61
61
if (intl_stringFromChar (id, str_id, str_id_len, &status) == FAILURE) {
62
62
intl_error_set (NULL , status,
63
- " intltz_create_time_zone: could not convert time zone id to UTF-16" , 0 );
63
+ " could not convert time zone id to UTF-16" , 0 );
64
64
RETURN_NULL ();
65
65
}
66
66
@@ -84,7 +84,7 @@ U_CFUNC PHP_FUNCTION(intltz_from_date_time_zone)
84
84
tzobj = Z_PHPTIMEZONE_P (zv_timezone);
85
85
if (!tzobj->initialized ) {
86
86
intl_error_set (NULL , U_ILLEGAL_ARGUMENT_ERROR,
87
- " intltz_from_date_time_zone: DateTimeZone object is unconstructed" ,
87
+ " DateTimeZone object is unconstructed" ,
88
88
0 );
89
89
RETURN_NULL ();
90
90
}
@@ -151,7 +151,7 @@ U_CFUNC PHP_FUNCTION(intltz_create_enumeration)
151
151
if (UNEXPECTED (Z_LVAL_P (arg) < (zend_long)INT32_MIN ||
152
152
Z_LVAL_P (arg) > (zend_long)INT32_MAX)) {
153
153
intl_error_set (NULL , U_ILLEGAL_ARGUMENT_ERROR,
154
- " intltz_create_enumeration: value is out of range" , 0 );
154
+ " value is out of range" , 0 );
155
155
RETURN_FALSE;
156
156
} else {
157
157
se = TimeZone::createEnumeration ((int32_t ) Z_LVAL_P (arg));
@@ -180,15 +180,15 @@ U_CFUNC PHP_FUNCTION(intltz_create_enumeration)
180
180
se = TimeZone::createEnumeration (Z_STRVAL_P (arg));
181
181
} else {
182
182
intl_error_set (NULL , U_ILLEGAL_ARGUMENT_ERROR,
183
- " intltz_create_enumeration: invalid argument type" , 0 );
183
+ " invalid argument type" , 0 );
184
184
RETURN_FALSE;
185
185
}
186
186
187
187
if (se) {
188
188
IntlIterator_from_StringEnumeration (se, return_value);
189
189
} else {
190
190
intl_error_set (NULL , U_ILLEGAL_ARGUMENT_ERROR,
191
- " intltz_create_enumeration: error obtaining enumeration" , 0 );
191
+ " error obtaining enumeration" , 0 );
192
192
RETVAL_FALSE;
193
193
}
194
194
}
@@ -208,7 +208,7 @@ U_CFUNC PHP_FUNCTION(intltz_count_equivalent_ids)
208
208
UnicodeString id = UnicodeString ();
209
209
if (intl_stringFromChar (id, str_id, str_id_len, &status) == FAILURE) {
210
210
intl_error_set (NULL , status,
211
- " intltz_count_equivalent_ids: could not convert time zone id to UTF-16" , 0 );
211
+ " could not convert time zone id to UTF-16" , 0 );
212
212
RETURN_FALSE;
213
213
}
214
214
@@ -236,14 +236,14 @@ U_CFUNC PHP_FUNCTION(intltz_create_time_zone_id_enumeration)
236
236
if (zoneType != UCAL_ZONE_TYPE_ANY && zoneType != UCAL_ZONE_TYPE_CANONICAL
237
237
&& zoneType != UCAL_ZONE_TYPE_CANONICAL_LOCATION) {
238
238
intl_error_set (NULL , U_ILLEGAL_ARGUMENT_ERROR,
239
- " intltz_create_time_zone_id_enumeration: bad zone type" , 0 );
239
+ " bad zone type" , 0 );
240
240
RETURN_FALSE;
241
241
}
242
242
243
243
if (!arg3isnull) {
244
244
if (UNEXPECTED (offset_arg < (zend_long)INT32_MIN || offset_arg > (zend_long)INT32_MAX)) {
245
245
intl_error_set (NULL , U_ILLEGAL_ARGUMENT_ERROR,
246
- " intltz_create_time_zone_id_enumeration: offset out of bounds" , 0 );
246
+ " offset out of bounds" , 0 );
247
247
RETURN_FALSE;
248
248
}
249
249
offset = (int32_t )offset_arg;
@@ -254,8 +254,7 @@ U_CFUNC PHP_FUNCTION(intltz_create_time_zone_id_enumeration)
254
254
UErrorCode uec = UErrorCode ();
255
255
se = TimeZone::createTimeZoneIDEnumeration ((USystemTimeZoneType)zoneType,
256
256
region, offsetp, uec);
257
- INTL_CHECK_STATUS (uec, " intltz_create_time_zone_id_enumeration: "
258
- " Error obtaining time zone id enumeration" )
257
+ INTL_CHECK_STATUS (uec, " error obtaining time zone id enumeration" )
259
258
260
259
IntlIterator_from_StringEnumeration (se, return_value);
261
260
}
@@ -276,18 +275,18 @@ U_CFUNC PHP_FUNCTION(intltz_get_canonical_id)
276
275
UnicodeString id;
277
276
if (intl_stringFromChar (id, str_id, str_id_len, &status) == FAILURE) {
278
277
intl_error_set (NULL , status,
279
- " intltz_get_canonical_id: could not convert time zone id to UTF-16" , 0 );
278
+ " could not convert time zone id to UTF-16" , 0 );
280
279
RETURN_FALSE;
281
280
}
282
281
283
282
UnicodeString result;
284
283
UBool isSystemID;
285
284
TimeZone::getCanonicalID (id, result, isSystemID, status);
286
- INTL_CHECK_STATUS (status, " intltz_get_canonical_id: error obtaining canonical ID" );
285
+ INTL_CHECK_STATUS (status, " error obtaining canonical ID" );
287
286
288
287
zend_string *u8str =intl_convert_utf16_to_utf8 (result.getBuffer (), result.length (), &status);
289
288
INTL_CHECK_STATUS (status,
290
- " intltz_get_canonical_id: could not convert time zone id to UTF-16" );
289
+ " could not convert time zone id to UTF-16" );
291
290
RETVAL_NEW_STR (u8str);
292
291
293
292
if (is_systemid) { /* by-ref argument passed */
@@ -313,12 +312,12 @@ U_CFUNC PHP_FUNCTION(intltz_get_region)
313
312
UnicodeString id;
314
313
if (intl_stringFromChar (id, str_id, str_id_len, &status) == FAILURE) {
315
314
intl_error_set (NULL , status,
316
- " intltz_get_region: could not convert time zone id to UTF-16" , 0 );
315
+ " could not convert time zone id to UTF-16" , 0 );
317
316
RETURN_FALSE;
318
317
}
319
318
320
319
int32_t region_len = TimeZone::getRegion (id, outbuf, sizeof (outbuf), status);
321
- INTL_CHECK_STATUS (status, " intltz_get_region: Error obtaining region" );
320
+ INTL_CHECK_STATUS (status, " error obtaining region" );
322
321
323
322
RETURN_STRINGL (outbuf, region_len);
324
323
}
@@ -333,8 +332,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_tz_data_version)
333
332
334
333
UErrorCode status = UErrorCode ();
335
334
const char *res = TimeZone::getTZDataVersion (status);
336
- INTL_CHECK_STATUS (status, " intltz_get_tz_data_version: "
337
- " Error obtaining time zone data version" );
335
+ INTL_CHECK_STATUS (status, " error obtaining time zone data version" );
338
336
339
337
RETURN_STRING (res);
340
338
}
@@ -358,16 +356,15 @@ U_CFUNC PHP_FUNCTION(intltz_get_equivalent_id)
358
356
UnicodeString id;
359
357
if (intl_stringFromChar (id, str_id, str_id_len, &status) == FAILURE) {
360
358
intl_error_set (NULL , status,
361
- " intltz_get_equivalent_id: could not convert time zone id to UTF-16" , 0 );
359
+ " could not convert time zone id to UTF-16" , 0 );
362
360
RETURN_FALSE;
363
361
}
364
362
365
363
const UnicodeString result = TimeZone::getEquivalentID (id, (int32_t )index );
366
364
zend_string *u8str;
367
365
368
366
u8str = intl_convert_utf16_to_utf8 (result.getBuffer (), result.length (), &status);
369
- INTL_CHECK_STATUS (status, " intltz_get_equivalent_id: "
370
- " could not convert resulting time zone id to UTF-16" );
367
+ INTL_CHECK_STATUS (status, " could not convert resulting time zone id to UTF-16" );
371
368
RETVAL_NEW_STR (u8str);
372
369
}
373
370
@@ -420,7 +417,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_id)
420
417
421
418
u8str = intl_convert_utf16_to_utf8 (
422
419
id_us.getBuffer (), id_us.length (), TIMEZONE_ERROR_CODE_P (to));
423
- INTL_METHOD_CHECK_STATUS (to, " intltz_get_id: Could not convert id to UTF-8" );
420
+ INTL_METHOD_CHECK_STATUS (to, " could not convert id to UTF-8" );
424
421
425
422
RETVAL_NEW_STR (u8str);
426
423
}
@@ -460,7 +457,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_offset)
460
457
to->utimezone ->getOffset ((UDate) date, (UBool) local, rawOffset, dstOffset,
461
458
TIMEZONE_ERROR_CODE (to));
462
459
463
- INTL_METHOD_CHECK_STATUS (to, " intltz_get_offset: error obtaining offset" );
460
+ INTL_METHOD_CHECK_STATUS (to, " error obtaining offset" );
464
461
465
462
zval_ptr_dtor (rawOffsetArg);
466
463
ZVAL_LONG (rawOffsetArg, rawOffset);
@@ -499,7 +496,7 @@ U_CFUNC PHP_FUNCTION(intltz_has_same_rules)
499
496
other_to = Z_INTL_TIMEZONE_P (other_object);
500
497
if (other_to->utimezone == NULL ) {
501
498
intl_errors_set (&to->err , U_ILLEGAL_ARGUMENT_ERROR,
502
- " intltz_has_same_rules: The second IntlTimeZone is unconstructed" , 0 );
499
+ " The second IntlTimeZone is unconstructed" , 0 );
503
500
RETURN_FALSE;
504
501
}
505
502
@@ -534,7 +531,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_display_name)
534
531
}
535
532
if (!found) {
536
533
intl_error_set (NULL , U_ILLEGAL_ARGUMENT_ERROR,
537
- " intltz_get_display_name: wrong display type" , 0 );
534
+ " wrong display type" , 0 );
538
535
RETURN_FALSE;
539
536
}
540
537
@@ -549,8 +546,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_display_name)
549
546
Locale::createFromName (locale_str), result);
550
547
551
548
zend_string *u8str = intl_convert_utf16_to_utf8 (result.getBuffer (), result.length (), TIMEZONE_ERROR_CODE_P (to));
552
- INTL_METHOD_CHECK_STATUS (to, " intltz_get_display_name: "
553
- " could not convert resulting time zone id to UTF-16" );
549
+ INTL_METHOD_CHECK_STATUS (to, " could not convert resulting time zone id to UTF-16" );
554
550
555
551
RETVAL_NEW_STR (u8str);
556
552
}
@@ -646,7 +642,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_windows_id)
646
642
error = U_ZERO_ERROR;
647
643
if (intl_stringFromChar (uID, id->val , id->len , &error) == FAILURE) {
648
644
intl_error_set (NULL , error,
649
- " intltz_get_windows_id: could not convert time zone id to UTF-16" , 0 );
645
+ " could not convert time zone id to UTF-16" , 0 );
650
646
RETURN_FALSE;
651
647
}
652
648
@@ -655,13 +651,13 @@ U_CFUNC PHP_FUNCTION(intltz_get_windows_id)
655
651
INTL_CHECK_STATUS (error, " intltz_get_windows_id: Unable to get timezone from windows ID" );
656
652
if (uWinID.length () == 0 ) {
657
653
intl_error_set (NULL , U_ILLEGAL_ARGUMENT_ERROR,
658
- " intltz_get_windows_id: Unknown system timezone" , 0 );
654
+ " unknown system timezone" , 0 );
659
655
RETURN_FALSE;
660
656
}
661
657
662
658
error = U_ZERO_ERROR;
663
659
winID = intl_convert_utf16_to_utf8 (uWinID.getBuffer (), uWinID.length (), &error);
664
- INTL_CHECK_STATUS (error, " intltz_get_windows_id: could not convert time zone id to UTF-8" );
660
+ INTL_CHECK_STATUS (error, " could not convert time zone id to UTF-8" );
665
661
RETURN_STR (winID);
666
662
}
667
663
/* }}} */
@@ -682,22 +678,22 @@ U_CFUNC PHP_FUNCTION(intltz_get_id_for_windows_id)
682
678
error = U_ZERO_ERROR;
683
679
if (intl_stringFromChar (uWinID, winID->val , winID->len , &error) == FAILURE) {
684
680
intl_error_set (NULL , error,
685
- " intltz_get_id_for_windows_id: could not convert time zone id to UTF-16" , 0 );
681
+ " could not convert time zone id to UTF-16" , 0 );
686
682
RETURN_FALSE;
687
683
}
688
684
689
685
error = U_ZERO_ERROR;
690
686
TimeZone::getIDForWindowsID (uWinID, region ? region->val : NULL , uID, error);
691
- INTL_CHECK_STATUS (error, " intltz_get_id_for_windows_id: Unable to get windows ID for timezone" );
687
+ INTL_CHECK_STATUS (error, " unable to get windows ID for timezone" );
692
688
if (uID.length () == 0 ) {
693
689
intl_error_set (NULL , U_ILLEGAL_ARGUMENT_ERROR,
694
- " intltz_get_windows_id: Unknown windows timezone" , 0 );
690
+ " unknown windows timezone" , 0 );
695
691
RETURN_FALSE;
696
692
}
697
693
698
694
error = U_ZERO_ERROR;
699
695
id = intl_convert_utf16_to_utf8 (uID.getBuffer (), uID.length (), &error);
700
- INTL_CHECK_STATUS (error, " intltz_get_id_for_windows_id: could not convert time zone id to UTF-8" );
696
+ INTL_CHECK_STATUS (error, " could not convert time zone id to UTF-8" );
701
697
RETURN_STR (id);
702
698
}
703
699
/* }}} */
0 commit comments