summaryrefslogtreecommitdiff
path: root/ext/shmop
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2020-01-15 11:27:29 +0100
committerMáté Kocsis <kocsismate@woohoolabs.com>2020-01-17 14:52:46 +0100
commitd1764ca33018f1f2e4a05926c879c67ad4aa8da5 (patch)
tree443cab099d2d5989a93a8102f599b51d36acc64e /ext/shmop
parent117b18d22d14fb6a597b3cd6d52e75cef2d088bb (diff)
downloadphp-git-d1764ca33018f1f2e4a05926c879c67ad4aa8da5.tar.gz
Make error messages more consistent by fixing capitalization
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
Diffstat (limited to 'ext/shmop')
-rw-r--r--ext/shmop/shmop.c18
-rw-r--r--ext/shmop/tests/001.phpt2
-rw-r--r--ext/shmop/tests/002.phpt10
3 files changed, 15 insertions, 15 deletions
diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c
index f6f8d88355..446c309458 100644
--- a/ext/shmop/shmop.c
+++ b/ext/shmop/shmop.c
@@ -155,7 +155,7 @@ PHP_FUNCTION(shmop_open)
*/
break;
default:
- php_error_docref(NULL, E_WARNING, "invalid access mode");
+ php_error_docref(NULL, E_WARNING, "Invalid access mode");
goto err;
}
@@ -166,19 +166,19 @@ PHP_FUNCTION(shmop_open)
shmop->shmid = shmget(shmop->key, shmop->size, shmop->shmflg);
if (shmop->shmid == -1) {
- php_error_docref(NULL, E_WARNING, "unable to attach or create shared memory segment '%s'", strerror(errno));
+ php_error_docref(NULL, E_WARNING, "Unable to attach or create shared memory segment '%s'", strerror(errno));
goto err;
}
if (shmctl(shmop->shmid, IPC_STAT, &shm)) {
/* please do not add coverage here: the segment would be leaked and impossible to delete via php */
- php_error_docref(NULL, E_WARNING, "unable to get shared memory segment information '%s'", strerror(errno));
+ php_error_docref(NULL, E_WARNING, "Unable to get shared memory segment information '%s'", strerror(errno));
goto err;
}
shmop->addr = shmat(shmop->shmid, 0, shmop->shmatflg);
if (shmop->addr == (char*) -1) {
- php_error_docref(NULL, E_WARNING, "unable to attach to shared memory segment '%s'", strerror(errno));
+ php_error_docref(NULL, E_WARNING, "Unable to attach to shared memory segment '%s'", strerror(errno));
goto err;
}
@@ -211,12 +211,12 @@ PHP_FUNCTION(shmop_read)
}
if (start < 0 || start > shmop->size) {
- php_error_docref(NULL, E_WARNING, "start is out of range");
+ php_error_docref(NULL, E_WARNING, "Start is out of range");
RETURN_FALSE;
}
if (count < 0 || start > (INT_MAX - count) || start + count > shmop->size) {
- php_error_docref(NULL, E_WARNING, "count is out of range");
+ php_error_docref(NULL, E_WARNING, "Count is out of range");
RETURN_FALSE;
}
@@ -287,12 +287,12 @@ PHP_FUNCTION(shmop_write)
}
if ((shmop->shmatflg & SHM_RDONLY) == SHM_RDONLY) {
- php_error_docref(NULL, E_WARNING, "trying to write to a read only segment");
+ php_error_docref(NULL, E_WARNING, "Trying to write to a read only segment");
RETURN_FALSE;
}
if (offset < 0 || offset > shmop->size) {
- php_error_docref(NULL, E_WARNING, "offset out of range");
+ php_error_docref(NULL, E_WARNING, "Offset out of range");
RETURN_FALSE;
}
@@ -319,7 +319,7 @@ PHP_FUNCTION(shmop_delete)
}
if (shmctl(shmop->shmid, IPC_RMID, NULL)) {
- php_error_docref(NULL, E_WARNING, "can't mark segment for deletion (are you the owner?)");
+ php_error_docref(NULL, E_WARNING, "Can't mark segment for deletion (are you the owner?)");
RETURN_FALSE;
}
diff --git a/ext/shmop/tests/001.phpt b/ext/shmop/tests/001.phpt
index a5ad01c302..471f82cbda 100644
--- a/ext/shmop/tests/001.phpt
+++ b/ext/shmop/tests/001.phpt
@@ -84,7 +84,7 @@ data in memory is: test #1 of the shmop() extension
shm open for read only: ok
data in memory is: test #1 of the shmop() extension
-Warning: shmop_write(): trying to write to a read only segment in %s on line %d
+Warning: shmop_write(): Trying to write to a read only segment in %s on line %d
shm open for read only: ok
shm write test #1: ok
data in memory is: test #1 of the shmop() extensiontest #2 append data to shared memory segment
diff --git a/ext/shmop/tests/002.phpt b/ext/shmop/tests/002.phpt
index a06f454445..12b1b6b95f 100644
--- a/ext/shmop/tests/002.phpt
+++ b/ext/shmop/tests/002.phpt
@@ -52,22 +52,22 @@ echo PHP_EOL, '## shmop_write function tests ##';
Warning: shmop_open(): is not a valid flag in %s on line %d
bool(false)
-Warning: shmop_open(): invalid access mode in %s on line %d
+Warning: shmop_open(): Invalid access mode in %s on line %d
bool(false)
-Warning: shmop_open(): unable to attach or create shared memory segment 'Invalid argument' in %s on line %d
+Warning: shmop_open(): Unable to attach or create shared memory segment 'Invalid argument' in %s on line %d
bool(false)
Warning: shmop_open(): Shared memory segment size must be greater than zero in %s on line %d
bool(false)
## shmop_read function tests ##
-Warning: shmop_read(): start is out of range in %s on line %d
+Warning: shmop_read(): Start is out of range in %s on line %d
bool(false)
-Warning: shmop_read(): count is out of range in %s on line %d
+Warning: shmop_read(): Count is out of range in %s on line %d
bool(false)
## shmop_write function tests ##
-Warning: shmop_write(): offset out of range in %s on line %d
+Warning: shmop_write(): Offset out of range in %s on line %d
bool(false)