Skip to content

Commit

Permalink
Fix for 32-bit (#30)
Browse files Browse the repository at this point in the history
Else float will be used and and break type hinting
  • Loading branch information
remicollet authored Jan 10, 2024
1 parent 72c63e0 commit a796f91
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
16 changes: 8 additions & 8 deletions tests/masks.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a796f91

Please sign in to comment.