From a796f918fa11a000cff65ea258281fa0454cf1bd Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 10 Jan 2024 17:55:29 +0100 Subject: [PATCH] Fix for 32-bit (#30) Else float will be used and and break type hinting --- Log.php | 2 +- tests/masks.phpt | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Log.php b/Log.php index d4b9239..1ff0974 100755 --- a/Log.php +++ b/Log.php @@ -19,7 +19,7 @@ define('PEAR_LOG_INFO', 6); /* Informational */ define('PEAR_LOG_DEBUG', 7); /* Debug-level messages */ -define('PEAR_LOG_ALL', 0xffffffff); /* All messages */ +define('PEAR_LOG_ALL', 0x7fffffff); /* All messages */ define('PEAR_LOG_NONE', 0x00000000); /* No message */ /* Log types for PHP's native error_log() function. */ diff --git a/tests/masks.phpt b/tests/masks.phpt index 48479d5..681b595 100644 --- a/tests/masks.phpt +++ b/tests/masks.phpt @@ -28,13 +28,13 @@ $logger->setMask(Log::MAX(PEAR_LOG_ERR)); $logger->info('Info 2'); --EXPECT-- -Level 0: 0x00000001, 0xffffffff, 0x00000001 -Level 1: 0x00000002, 0xfffffffe, 0x00000003 -Level 2: 0x00000004, 0xfffffffc, 0x00000007 -Level 3: 0x00000008, 0xfffffff8, 0x0000000f -Level 4: 0x00000010, 0xfffffff0, 0x0000001f -Level 5: 0x00000020, 0xffffffe0, 0x0000003f -Level 6: 0x00000040, 0xffffffc0, 0x0000007f -Level 7: 0x00000080, 0xffffff80, 0x000000ff +Level 0: 0x00000001, 0x7fffffff, 0x00000001 +Level 1: 0x00000002, 0x7ffffffe, 0x00000003 +Level 2: 0x00000004, 0x7ffffffc, 0x00000007 +Level 3: 0x00000008, 0x7ffffff8, 0x0000000f +Level 4: 0x00000010, 0x7ffffff0, 0x0000001f +Level 5: 0x00000020, 0x7fffffe0, 0x0000003f +Level 6: 0x00000040, 0x7fffffc0, 0x0000007f +Level 7: 0x00000080, 0x7fffff80, 0x000000ff ident [info] Info 1