Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #18300

Re: imap_search(): $charset parameter default value

From "J.O. Aho" <user@example.net>
Newsgroups comp.lang.php
Subject Re: imap_search(): $charset parameter default value
Date 2020-07-14 14:46 +0200
Message-ID <hn5nq1Fp922U1@mid.individual.net> (permalink)
References <rek04m$1bm$1@gioia.aioe.org>

Show all headers | View raw


On 14/07/2020 12.07, alex wrote:
> What is?
> 
> I did some tests with null, NIL and 0, but I was unable to reach a 
> conclusion.
> 
>             imap_search( >                $stream,
>                $criteria,
>                $options,
>                $charset
>            ); 


> Output:
> 
>   (NULL): imap_search() expects parameter 4 to be string, null given
> 0 (integer): imap_search() expects parameter 4 to be string, int given
> 0 (integer): imap_search() expects parameter 4 to be string, int given

IMHO the error does tells quite well what the function expects, a 
string, for example 'UTF-8'. If you don't want to select a charset, then 
don't set one, example: imap_search($stream, $criteria, $options);

Both options and charset are optional, read more at
https://www.php.net/manual/en/function.imap-search.php

-- 

  //Aho



Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

imap_search(): $charset parameter default value alex <1j9448a02@lnx159sneakemail.com.invalid> - 2020-07-14 12:07 +0200
  Re: imap_search(): $charset parameter default value alex <1j9448a02@lnx159sneakemail.com.invalid> - 2020-07-14 12:33 +0200
  Re: imap_search(): $charset parameter default value "J.O. Aho" <user@example.net> - 2020-07-14 14:46 +0200
    Re: imap_search(): $charset parameter default value alex <1j9448a02@lnx159sneakemail.com.invalid> - 2020-07-14 16:05 +0200

csiph-web