TMDB4PHP icon indicating copy to clipboard operation
TMDB4PHP copied to clipboard

One word movie search issue

Open jackdoe00 opened this issue 10 years ago • 1 comments

There seems to be an issue with searching for a one word movie title, my script hangs.

$results = $db->search('movie', array('query'=>$title));

Or am i missing something here?

jackdoe00 avatar Nov 01 '14 23:11 jackdoe00

I realise this is nearly 5 years after your post, but I discovered this repo only recently. I have a fix which may already have been applied in one of the many forks, so it probably should go into a pull request. Anyway, it stems from not having page=1 in the request. I was searching for the title "Up", year "2009" -- and it was always timing out. No doubt thousands of partial matches. In Client.php, you can add the following fix to the send_request() method:

		if ($method!='configuration' && $this->paged) {
			$params['page'] = 1;
		}

Obviously this won't work if you've set the "paged" property to false.

kdallas avatar May 12 '19 03:05 kdallas