summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-06-22 11:49:56 +0200
committerRemi Collet <remi@remirepo.net>2018-06-22 11:49:56 +0200
commit440ed3a09e19b3f55972b1adf622660c5550aa56 (patch)
tree41bd07eec094a9e3f4d79a9eecbacb23b62c846f
parentab830320928603dbdf019785803ffe371e2c852e (diff)
add patches
-rw-r--r--0001-fix-test-for-7.3-int-vs-integer.patch34
-rw-r--r--0002-fix-error-message-with-php-7-Wformat-warnings-raised.patch37
2 files changed, 71 insertions, 0 deletions
diff --git a/0001-fix-test-for-7.3-int-vs-integer.patch b/0001-fix-test-for-7.3-int-vs-integer.patch
new file mode 100644
index 0000000..e08f1b7
--- /dev/null
+++ b/0001-fix-test-for-7.3-int-vs-integer.patch
@@ -0,0 +1,34 @@
+From d9eb2378092d39678d1e2cf834c555f83d85b1a1 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 22 Jun 2018 11:43:23 +0200
+Subject: [PATCH 1/2] fix test for 7.3 (int vs integer)
+
+---
+ tests/004_WKBWriter.phpt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/004_WKBWriter.phpt b/tests/004_WKBWriter.phpt
+index d2b3c85..3a72e2d 100644
+--- a/tests/004_WKBWriter.phpt
++++ b/tests/004_WKBWriter.phpt
+@@ -139,7 +139,7 @@ class WKBWriterTest extends GEOSTest
+ $writer->write(1);
+ $this->assertTrue(false);
+ } catch (ErrorException $e) {
+- $this->assertContains('expects parameter 1 to be object, integer given', $e->getMessage());
++ $this->assertContains('expects parameter 1 to be object, int', $e->getMessage());
+ }
+ }
+
+@@ -151,7 +151,7 @@ class WKBWriterTest extends GEOSTest
+ $writer->writeHEX(1);
+ $this->assertTrue(false);
+ } catch (ErrorException $e) {
+- $this->assertContains('expects parameter 1 to be object, integer given', $e->getMessage());
++ $this->assertContains('expects parameter 1 to be object, int', $e->getMessage());
+ }
+ }
+ }
+--
+2.14.4
+
diff --git a/0002-fix-error-message-with-php-7-Wformat-warnings-raised.patch b/0002-fix-error-message-with-php-7-Wformat-warnings-raised.patch
new file mode 100644
index 0000000..78509b7
--- /dev/null
+++ b/0002-fix-error-message-with-php-7-Wformat-warnings-raised.patch
@@ -0,0 +1,37 @@
+From f881f614f11472090394538d4424f408cb61d581 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 22 Jun 2018 11:44:27 +0200
+Subject: [PATCH 2/2] fix error message with php 7+ (-Wformat warnings raised
+ by 7.3)
+
+---
+ geos.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/geos.c b/geos.c
+index 2c81428..fc679e8 100755
+--- a/geos.c
++++ b/geos.c
+@@ -189,11 +189,19 @@ getRelay(zval* val, zend_class_entry* ce) {
+
+ if ( proxy->std.ce != ce ) {
+ php_error_docref(NULL TSRMLS_CC, E_ERROR,
++#if PHP_VERSION_ID >= 70000
++ "Relay object is not an %s", ZSTR_VAL(ce->name));
++#else
+ "Relay object is not an %s", ce->name);
++#endif
+ }
+ if ( ! proxy->relay ) {
+ php_error_docref(NULL TSRMLS_CC, E_ERROR,
++#if PHP_VERSION_ID >= 70000
++ "Relay object for object of type %s is not set", ZSTR_VAL(ce->name));
++#else
+ "Relay object for object of type %s is not set", ce->name);
++#endif
+ }
+ return proxy->relay;
+ }
+--
+2.14.4
+