Closed ryckblick closed 5 years ago
@AgenturSofa are you sure of this since on the example
$some = imap_search($conn, 'SUBJECT "HOWTO be Awesome" SINCE "8 August 2008"', SE_UID);
in the readme
$search->addCondition(new Since(date("j F Y")))
# will be
$search->addCondition("SINCE \"12 November 2018\"");
public function __construct($data)
{
$this->data = $data;
}
/**
* Query String
*
* @return string
*/
public function __toString()
{
return "SINCE \"{$this->data}\"";
}
Aw crap. I used the example wrong... I'm so sorry. Is there a way to delete the issue?
no problem, that is fine. at least your issue solved!
The code example suggest a usage as follows:
$search->addCondition(new Since(date("j F Y")));
If you do it like this, it throws a Notice: Unknown search criterion: SINCE (errflg=2) and stops working. You should use SINCE without date() as suggested in http://php.net/manual/en/function.imap-search.php Example 1
If the code example was
$search->addCondition(new Since("j F Y"));
instead. Everything works fine. Cheers! :)