Files
pecl-memcache/tests/githubbug53.phpt
Zaffy e090f05a05 More work on pecl-memcache (#76)
* Use zend_bool for ini bool settings

Related to #56

* Initial work for php 8

* php7 -> php8

* Add test for #53

* Fix support for binary protocol

* php8 -> src

* Backwards compatibility with php 7.3, 7.4

This will allow us to have one unified branch that will compile
under different versions of php.

* Add test for pecl bug #77900

* Fix some memory leaks

* Support for reflection

- added / updated arginfos
- fix functions returning NULL instead of advertised return type,
  For example, when memcached returned error on "delete", function
  returned null instead of false
- added tests for both php8 and 7

* Fix typo

* Update config.w32

Co-authored-by: Tyson Andre <tyson.andre@uwaterloo.ca>

Co-authored-by: Tyson Andre <tysonandre775@hotmail.com>
Co-authored-by: Tomas Srnka <tomassrnka@users.noreply.github.com>
Co-authored-by: Tyson Andre <tyson.andre@uwaterloo.ca>
2020-10-16 09:52:01 +02:00

27 lines
545 B
PHP

--TEST--
Module shouldn't crash on failed serialization
--SKIPIF--
<?php include 'connect.inc'; ?>
--FILE--
<?php
include 'connect.inc';
class foo {
function __sleep() {
throw new \Exception("fail");
}
}
$oFoo = new foo();
$memcache->set('foobar', $oFoo);
--EXPECTF--
Warning: MemcachePool::set(): Failed to serialize value in %s on line %d
Fatal error: Uncaught Exception: fail in %s:%d
Stack trace:
#0 [internal function]: foo->__sleep()
#1 %s(%d): MemcachePool->set('foobar', Object(foo))
#2 {main}
thrown in %s on line %d