Just been caught out by stristr trying to converting the needle from an Int to an ASCII value.
Got round this by casting the value to a string.
<?php
if( !stristr( $file, (string) $myCustomer->getCustomerID() ) ) {
// Permission denied
}
?>