From: Matt Wilmas Date: Sat, 6 Jun 2009 02:40:14 +0000 (+0000) Subject: Fixed error message grammar: X-Git-Tag: php-5.4.0alpha1~191^2~3396 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fa54a9d0f3bc720cf9119191a4fb31759e3f954a;p=php Fixed error message grammar: - "cannot" instead of "can not" (meaning "also can") - "than" instead of "then" (Hint: "then" should hardly be needed; you're not telling the order in which to do something) ... plus removed a couple ending. dots --- diff --git a/ext/dom/xpath.c b/ext/dom/xpath.c index ad2ced8ba9..ffea84fcfd 100644 --- a/ext/dom/xpath.c +++ b/ext/dom/xpath.c @@ -232,7 +232,7 @@ static void dom_xpath_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, } else if (retval->type == IS_BOOL) { valuePush(ctxt, xmlXPathNewBoolean(retval->value.lval)); } else if (retval->type == IS_OBJECT) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "A PHP Object can not be converted to a XPath-string"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "A PHP Object cannot be converted to a XPath-string"); valuePush(ctxt, xmlXPathNewString((xmlChar *)"")); } else { convert_to_string_with_converter(retval, UG(utf8_conv)); diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 2fac227682..c499c1da07 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -3726,7 +3726,7 @@ PHP_FUNCTION(imap_mail_compose) if (!cookie) { cookie = "-"; } else if (strlen(cookie) > (SENDBUFLEN - 2 - 2 - 2)) { /* validate cookie length -- + CRLF * 2 */ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "The boudary should be no longer then 4kb"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "The boundary should be no longer than 4kb"); RETVAL_FALSE; goto done; } diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c index 52810b0a7e..9a3234ace3 100644 --- a/ext/mcrypt/mcrypt.c +++ b/ext/mcrypt/mcrypt.c @@ -1169,7 +1169,7 @@ PHP_FUNCTION(mcrypt_create_iv) int php_mcrypt_iv(php_mcrypt_iv_source source, int size, char **iv_str, int *iv_len TSRMLS_DC) { if (size <= 0 || size >= INT_MAX) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can not create an IV with a size of less then 1 or greater then %d", INT_MAX); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot create an IV with a size of less than 1 or greater than %d", INT_MAX); return FAILURE; } diff --git a/ext/odbc/birdstep.c b/ext/odbc/birdstep.c index c3e1a6eaf9..139666887a 100644 --- a/ext/odbc/birdstep.c +++ b/ext/odbc/birdstep.c @@ -369,7 +369,7 @@ PHP_FUNCTION(birdstep_exec) } stat = SQLExecDirect(res->hstmt,query,SQL_NTS); if ( stat != SQL_SUCCESS && stat != SQL_SUCCESS_WITH_INFO ) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Birdstep: Can not execute \"%s\" query",query); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Birdstep: Cannot execute \"%s\" query",query); SQLFreeStmt(res->hstmt,SQL_DROP); efree(res); RETURN_FALSE; diff --git a/ext/posix/posix.c b/ext/posix/posix.c index be399961f4..40f9b6297a 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -886,7 +886,7 @@ PHP_FUNCTION(posix_mknod) #if defined(HAVE_MAKEDEV) || defined(makedev) php_dev = makedev(major, minor); #else - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can not create a block or character device, creating a normal file instead"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot create a block or character device, creating a normal file instead"); #endif } } diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c index 51567930ec..5c78f916c7 100644 --- a/ext/shmop/shmop.c +++ b/ext/shmop/shmop.c @@ -215,7 +215,7 @@ PHP_FUNCTION(shmop_open) } if (shmop->shmflg & IPC_CREAT && shmop->size < 1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Shared memory segment size must be greater then zero."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Shared memory segment size must be greater than zero"); goto err; } diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 156fda847a..9250d44b03 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -6036,7 +6036,7 @@ PHP_FUNCTION(parse_ini_file) } if (filename_len == 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Filename can not be empty!"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Filename cannot be empty!"); RETURN_FALSE; } diff --git a/ext/standard/browscap.c b/ext/standard/browscap.c index 8dc911b435..e6c97afa2d 100644 --- a/ext/standard/browscap.c +++ b/ext/standard/browscap.c @@ -122,7 +122,7 @@ static void php_browscap_parser_cb(zval *arg1, zval *arg2, zval *arg3, int callb current_section_name != NULL && !strcasecmp(current_section_name, Z_STRVAL_P(arg2)) ) { - zend_error(E_CORE_ERROR, "Invalid browscap ini file: 'Parent' value can not be same as the section name: %s (in file %s)", current_section_name, INI_STR("browscap")); + zend_error(E_CORE_ERROR, "Invalid browscap ini file: 'Parent' value cannot be same as the section name: %s (in file %s)", current_section_name, INI_STR("browscap")); return; } diff --git a/ext/standard/head.c b/ext/standard/head.c index c0831bfd12..bbbb31890c 100644 --- a/ext/standard/head.c +++ b/ext/standard/head.c @@ -84,12 +84,12 @@ PHPAPI int php_setcookie(char *name, int name_len, char *value, int value_len, t int result; if (name && strpbrk(name, "=,; \t\r\n\013\014") != NULL) { /* man isspace for \013 and \014 */ - zend_error( E_WARNING, "Cookie names can not contain any of the following '=,; \\t\\r\\n\\013\\014'" ); + zend_error( E_WARNING, "Cookie names cannot contain any of the following '=,; \\t\\r\\n\\013\\014'" ); return FAILURE; } if (!url_encode && value && strpbrk(value, ",; \t\r\n\013\014") != NULL) { /* man isspace for \013 and \014 */ - zend_error( E_WARNING, "Cookie values can not contain any of the following ',; \\t\\r\\n\\013\\014'" ); + zend_error( E_WARNING, "Cookie values cannot contain any of the following ',; \\t\\r\\n\\013\\014'" ); return FAILURE; } diff --git a/ext/standard/tests/file/parse_ini_file_variation4.phpt b/ext/standard/tests/file/parse_ini_file_variation4.phpt index 0032c6a2d4..5ff708e3a4 100644 --- a/ext/standard/tests/file/parse_ini_file_variation4.phpt +++ b/ext/standard/tests/file/parse_ini_file_variation4.phpt @@ -165,11 +165,11 @@ Error: 2 - parse_ini_file(Array): failed to open stream: No such file or directo bool(false) --uppercase NULL-- -Error: 2 - parse_ini_file(): Filename can not be empty!, %s(%d) +Error: 2 - parse_ini_file(): Filename cannot be empty!, %s(%d) bool(false) --lowercase null-- -Error: 2 - parse_ini_file(): Filename can not be empty!, %s(%d) +Error: 2 - parse_ini_file(): Filename cannot be empty!, %s(%d) bool(false) --lowercase true-- @@ -177,7 +177,7 @@ Error: 2 - parse_ini_file(1): failed to open stream: No such file or directory, bool(false) --lowercase false-- -Error: 2 - parse_ini_file(): Filename can not be empty!, %s(%d) +Error: 2 - parse_ini_file(): Filename cannot be empty!, %s(%d) bool(false) --uppercase TRUE-- @@ -185,15 +185,15 @@ Error: 2 - parse_ini_file(1): failed to open stream: No such file or directory, bool(false) --uppercase FALSE-- -Error: 2 - parse_ini_file(): Filename can not be empty!, %s(%d) +Error: 2 - parse_ini_file(): Filename cannot be empty!, %s(%d) bool(false) --empty string DQ-- -Error: 2 - parse_ini_file(): Filename can not be empty!, %s(%d) +Error: 2 - parse_ini_file(): Filename cannot be empty!, %s(%d) bool(false) --empty string SQ-- -Error: 2 - parse_ini_file(): Filename can not be empty!, %s(%d) +Error: 2 - parse_ini_file(): Filename cannot be empty!, %s(%d) bool(false) --instance of classWithToString-- @@ -207,11 +207,11 @@ Error: 2 - parse_ini_file(Object): failed to open stream: No such file or direct bool(false) --undefined var-- -Error: 2 - parse_ini_file(): Filename can not be empty!, %s(%d) +Error: 2 - parse_ini_file(): Filename cannot be empty!, %s(%d) bool(false) --unset var-- -Error: 2 - parse_ini_file(): Filename can not be empty!, %s(%d) +Error: 2 - parse_ini_file(): Filename cannot be empty!, %s(%d) bool(false) ===DONE=== diff --git a/ext/sysvshm/sysvshm.c b/ext/sysvshm/sysvshm.c index 9f62086e3a..bf9e773e0c 100644 --- a/ext/sysvshm/sysvshm.c +++ b/ext/sysvshm/sysvshm.c @@ -157,7 +157,7 @@ PHP_FUNCTION(shm_attach) } if (shm_size < 1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Segment size must be greater then zero."); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Segment size must be greater than zero"); RETURN_FALSE; } diff --git a/ext/sysvshm/tests/002.phpt b/ext/sysvshm/tests/002.phpt index 9f1502702e..d035a409ec 100644 --- a/ext/sysvshm/tests/002.phpt +++ b/ext/sysvshm/tests/002.phpt @@ -39,21 +39,21 @@ NULL Warning: shm_attach() expects at most 3 parameters, 4 given in %s on line %d NULL -Warning: shm_attach(): Segment size must be greater then zero. in %s on line %d +Warning: shm_attach(): Segment size must be greater than zero in %s on line %d bool(false) -Warning: shm_attach(): Segment size must be greater then zero. in %s on line %d +Warning: shm_attach(): Segment size must be greater than zero in %s on line %d bool(false) -Warning: shm_attach(): Segment size must be greater then zero. in %s on line %d +Warning: shm_attach(): Segment size must be greater than zero in %s on line %d bool(false) -Warning: shm_attach(): Segment size must be greater then zero. in %s on line %d +Warning: shm_attach(): Segment size must be greater than zero in %s on line %d bool(false) Warning: shm_remove() expects parameter 1 to be resource, boolean given in %s on line %d -Warning: shm_attach(): Segment size must be greater then zero. in %s on line %d +Warning: shm_attach(): Segment size must be greater than zero in %s on line %d bool(false) Warning: shm_remove() expects parameter 1 to be resource, boolean given in %s on line %d diff --git a/ext/xsl/tests/xslt011.phpt b/ext/xsl/tests/xslt011.phpt index 00e07699d7..da57eae041 100644 --- a/ext/xsl/tests/xslt011.phpt +++ b/ext/xsl/tests/xslt011.phpt @@ -49,7 +49,7 @@ $dom = new domDocument(); --EXPECTF-- Test 11: php:function Support -Warning: XSLTProcessor::transformToXml(): A PHP Object can not be converted to a XPath-string in %s on line 16 +Warning: XSLTProcessor::transformToXml(): A PHP Object cannot be converted to a XPath-string in %s on line 16 foobar - secondArg foobar - diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index c5085d9f67..a163594309 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -344,7 +344,7 @@ static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int t } else if (retval->type == IS_BOOL) { valuePush(ctxt, xmlXPathNewBoolean(retval->value.lval)); } else if (retval->type == IS_OBJECT) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "A PHP Object can not be converted to a XPath-string"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "A PHP Object cannot be converted to a XPath-string"); valuePush(ctxt, xmlXPathNewString("")); } else { convert_to_string_with_converter(retval, UG(utf8_conv));