From b9789b89d209004941c9c759c6eabbb3bc638cd3 Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Thu, 25 Jul 2024 13:48:35 +0200 Subject: [PATCH] Remove int cast to avoid warnings on 32-bit platforms --- tests/cursor/cursor-session-001.phpt | 4 ++-- tests/cursor/cursor-session-002.phpt | 4 ++-- tests/cursor/cursor-session-003.phpt | 4 ++-- tests/cursor/cursor-session-004.phpt | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/cursor/cursor-session-001.phpt b/tests/cursor/cursor-session-001.phpt index efa7799dd..e5f0ef66f 100644 --- a/tests/cursor/cursor-session-001.phpt +++ b/tests/cursor/cursor-session-001.phpt @@ -26,7 +26,7 @@ $iterator = new IteratorIterator($cursor); $iterator->rewind(); $iterator->next(); -printf("Cursor ID is zero: %s\n", (int) $cursor->getId(true) === 0 ? 'yes' : 'no'); +printf("Cursor ID is zero: %s\n", $cursor->getId(true) == 0 ? 'yes' : 'no'); var_dump($cursor); $iterator->next(); @@ -35,7 +35,7 @@ $iterator->next(); * is exhausted. While this is primarily done to ensure implicit sessions for * command cursors are returned to the pool ASAP, it also applies to explicit * sessions. */ -printf("\nCursor ID is zero: %s\n", (int) $cursor->getId(true) === 0 ? 'yes' : 'no'); +printf("\nCursor ID is zero: %s\n", $cursor->getId(true) == 0 ? 'yes' : 'no'); var_dump($cursor); ?> diff --git a/tests/cursor/cursor-session-002.phpt b/tests/cursor/cursor-session-002.phpt index 840eb7ccc..b8827c2c4 100644 --- a/tests/cursor/cursor-session-002.phpt +++ b/tests/cursor/cursor-session-002.phpt @@ -28,12 +28,12 @@ $iterator->next(); /* Implicit sessions for query cursors are never exposed to PHPC, as they are * handled internally by libmongoc. Cursor debug ouput should never report such * sessions. */ -printf("Cursor ID is zero: %s\n", (int) $cursor->getId(true) === 0 ? 'yes' : 'no'); +printf("Cursor ID is zero: %s\n", $cursor->getId(true) == 0 ? 'yes' : 'no'); var_dump($cursor); $iterator->next(); -printf("\nCursor ID is zero: %s\n", (int) $cursor->getId(true) === 0 ? 'yes' : 'no'); +printf("\nCursor ID is zero: %s\n", $cursor->getId(true) == 0 ? 'yes' : 'no'); var_dump($cursor); ?> diff --git a/tests/cursor/cursor-session-003.phpt b/tests/cursor/cursor-session-003.phpt index 91b5a796d..2eabbe616 100644 --- a/tests/cursor/cursor-session-003.phpt +++ b/tests/cursor/cursor-session-003.phpt @@ -30,7 +30,7 @@ $iterator = new IteratorIterator($cursor); $iterator->rewind(); $iterator->next(); -printf("Cursor ID is zero: %s\n", (int) $cursor->getId(true) === 0 ? 'yes' : 'no'); +printf("Cursor ID is zero: %s\n", $cursor->getId(true) == 0 ? 'yes' : 'no'); var_dump($cursor); $iterator->next(); @@ -39,7 +39,7 @@ $iterator->next(); * is exhausted. While this is primarily done to ensure implicit sessions for * command cursors are returned to the pool ASAP, it also applies to explicit * sessions. */ -printf("\nCursor ID is zero: %s\n", (int) $cursor->getId(true) === 0 ? 'yes' : 'no'); +printf("\nCursor ID is zero: %s\n", $cursor->getId(true) == 0 ? 'yes' : 'no'); var_dump($cursor); ?> diff --git a/tests/cursor/cursor-session-004.phpt b/tests/cursor/cursor-session-004.phpt index f792276b9..1fc23ffef 100644 --- a/tests/cursor/cursor-session-004.phpt +++ b/tests/cursor/cursor-session-004.phpt @@ -29,7 +29,7 @@ $iterator = new IteratorIterator($cursor); $iterator->rewind(); $iterator->next(); -printf("Cursor ID is zero: %s\n", (int) $cursor->getId(true) === 0 ? 'yes' : 'no'); +printf("Cursor ID is zero: %s\n", $cursor->getId(true) == 0 ? 'yes' : 'no'); var_dump($cursor); $iterator->next(); @@ -38,7 +38,7 @@ $iterator->next(); * libmongoc, PHPC-1152 emulates its own implicit sessions for command cursors * in order to ensure that command cursors always share the same session as the * originating command. */ -printf("\nCursor ID is zero: %s\n", (int) $cursor->getId(true) === 0 ? 'yes' : 'no'); +printf("\nCursor ID is zero: %s\n", $cursor->getId(true) == 0 ? 'yes' : 'no'); var_dump($cursor); ?>