summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/shmop/shmop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c
index 645434d787..4fcdfa89da 100644
--- a/ext/shmop/shmop.c
+++ b/ext/shmop/shmop.c
@@ -169,7 +169,7 @@ PHP_FUNCTION(shmop_open)
goto err;
}
- if (shmop->size < 1) {
+ 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.");
goto err;
}