From d3f562cfa2d08a33348766c6f71bf72fe449f2a4 Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Mon, 16 May 2022 17:52:12 +0300 Subject: [PATCH] Fixing msgpack custom --- config.inc.php | 4 ++-- msgpack_custom.inc.php | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 msgpack_custom.inc.php diff --git a/config.inc.php b/config.inc.php index c282006..a860ebd 100644 --- a/config.inc.php +++ b/config.inc.php @@ -897,9 +897,9 @@ else { function config_msgpack_pack($data) { - include_once(__DIR__ . '/../utils/msgpack_custom.inc.php'); + include_once(__DIR__ . '/msgpack_custom.inc.php'); - $packer = new MessagePackCustom(); + $packer = new \MessagePackCustom(); return $packer->pack($data); } diff --git a/msgpack_custom.inc.php b/msgpack_custom.inc.php new file mode 100644 index 0000000..b8c6833 --- /dev/null +++ b/msgpack_custom.inc.php @@ -0,0 +1,23 @@ +> 8).\chr($length).$str; + } + + return \pack('CN', 0xdb, $length).$str; + } +}