Undefined variable return...
Getting this error: PHP Notice: Undefined variable: return in .../html/modules/scapi/query_handlers/scrapers/Scraper.php on line 147
Here's what I'm doing. I'm actually bypassing the web server all together by passing the query as an array to Controller.php. The array is exactly what is passed with $_GET from the url.
My Code: http://pastebin.com/DFCxh5as
Well the issue is that either I'm not passing the correct information or something is wonky as all get out. So I'm not asking for code confirmation, but more that maybe there's something that's not working somewhere.
Comments (7)
-
reporter -
reporter - marked as minor
Changed to a minor/trivial bug.
-
reporter - marked as trivial
More than likely I'll root through the code today to see what is wrong. Your code works flawlessly when called from a web browser, but I'm going to take what I've learned and apply it to a command line application. I'm sure it's something I'm doing on my end that's causing the major issue.
Thanks for the awesome api tho!
-
reporter -
assigned issue to
- edited description
-
assigned issue to
-
Oh boy, I don't get emails unless I'm the assignee. Sorry for the delay.
Notices aren't errors. I'll tell you right now, I abuse the hell out of PHP's flexibility so you'll likely get plenty of those kinds of notices. If you want to turn them off, you can change your error reporting settings (http://php.net/manual/en/function.error-reporting.php). NOTICE-level errors are really only meant for development so, unless you're planning on changing the api, it's likely best to at least tune error reporting to a production level for the API calls themselves.
You can see some examples in the page I linked for changing the error reporting within a given script rather than globally, in php.ini.
-
reporter thanks man! :)
-
- changed status to resolved
- Log in to comment
btw, I haven't changed anything on the api side, yet.