1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
From 43bbf0080206b157b0d3f47ab1f07ede4bc80c86 Mon Sep 17 00:00:00 2001
From: Aaron Stone <aaron@serendipity.cx>
Date: Fri, 7 Jul 2017 18:45:42 -0700
Subject: [PATCH] In PHP 7.2, php_errormsg is deprecated
---
tests/append.phpt | 2 +-
tests/bad_construct.phpt | 2 +-
tests/experimental/fetch_badunserialize.phpt | 2 +-
tests/experimental/fetchall_badunserialize.phpt | 2 +-
tests/experimental/getdelayed_badunserialize.phpt | 2 +-
tests/experimental/getdelayed_cbthrows.phpt | 2 +-
tests/experimental/getmulti_badunserialize.phpt | 2 +-
tests/experimental/replace_bykey.phpt | 2 +-
tests/experimental/serializer/serializer_php_bad_serialize.phpt | 2 +-
tests/experimental/serializer/serializer_php_bad_unserialize.phpt | 2 +-
tests/experimental/setmulti_badserialize.phpt | 2 +-
tests/incrdecr.phpt | 8 ++++----
tests/incrdecr_bykey.phpt | 8 ++++----
13 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/tests/append.phpt b/tests/append.phpt
index c463fde..b958b39 100644
--- a/tests/append.phpt
+++ b/tests/append.phpt
@@ -11,7 +11,7 @@ error_reporting(0);
$m->delete('foo');
$m->setOption(Memcached::OPT_COMPRESSION, true);
var_dump($m->append('foo', 'a'));
-echo $php_errormsg, "\n";
+echo error_get_last()["message"], "\n";
$m->setOption(Memcached::OPT_COMPRESSION, false);
$m->delete('foo');
diff --git a/tests/bad_construct.phpt b/tests/bad_construct.phpt
index aa9b18c..0b740e0 100644
--- a/tests/bad_construct.phpt
+++ b/tests/bad_construct.phpt
@@ -6,7 +6,7 @@ Memcached construct with bad arguments
<?php
$m = new Memcached((object)array());
-echo $php_errormsg, "\n";
+echo error_get_last()["message"], "\n";
var_dump($m);
class extended extends Memcached {
diff --git a/tests/incrdecr.phpt b/tests/incrdecr.phpt
index b4e9469..87b410c 100644
--- a/tests/incrdecr.phpt
+++ b/tests/incrdecr.phpt
@@ -31,14 +31,14 @@ var_dump($m->get('foo'));
error_reporting(0);
echo "Negative offset\n";
-$php_errormsg = '';
+error_clear_last();
$m->increment('foo', -1);
-echo $php_errormsg, "\n";
+echo error_get_last()["message"], "\n";
var_dump($m->get('foo'));
-$php_errormsg = '';
+error_clear_last();
$m->decrement('foo', -1);
-echo $php_errormsg, "\n";
+echo error_get_last()["message"], "\n";
var_dump($m->get('foo'));
echo "Enormous offset\n";
diff --git a/tests/incrdecr_bykey.phpt b/tests/incrdecr_bykey.phpt
index 8b931fa..ee08993 100644
--- a/tests/incrdecr_bykey.phpt
+++ b/tests/incrdecr_bykey.phpt
@@ -28,14 +28,14 @@ var_dump($m->get('foo'));
error_reporting(0);
echo "Negative offset\n";
-$php_errormsg = '';
+error_clear_last();
$m->incrementByKey('foo', 'foo', -1);
-echo $php_errormsg, "\n";
+echo error_get_last()["message"], "\n";
var_dump($m->get('foo'));
-$php_errormsg = '';
+error_clear_last();
$m->decrementByKey('foo', 'foo', -1);
-echo $php_errormsg, "\n";
+echo error_get_last()["message"], "\n";
var_dump($m->get('foo'));
echo "Enormous offset\n";
|