I am trying to start testing the PHP SDK but I cannot get much out of it. It seems strange error and I wonder if anyone is having the same problems:
I have a simple code in PHP
QUOTE
<?php
// Include the PHP SDK to access library
include_once("yosdk/lib/Yahoo.inc");
// Your Consumer Key (API Key) goes here.
define('CONSUMER_KEY', "myconsumerKEY--");
// Your Consumer Secret goes here.
define('CONSUMER_SECRET', "myconsumerSECRET");
// Your application ID goes here.
define('APPID', "8nWCnY76");
$session = YahooSession::requireSession(CONSUMER_KEY,CONSUMER_SECRET,APPID);
?>
When I call this file in the browser I get:
<br />
<b>Warning</b>: array_key_exists() [<a href='function.array-key-exists'>function.array-key-exists</a>]: The second argument should be either an array or an object in <b>/home/lajme2/public_html/yahoo/yosdk/lib/Yahoo.inc</b> on line <b>1507</b><br />
<br />
<b>Warning</b>: array_key_exists() [<a href='function.array-key-exists'>function.array-key-exists</a>]: The second argument should be either an array or an object in <b>/home/lajme2/public_html/yahoo/yosdk/lib/Yahoo.inc</b> on line <b>1498</b><br />
<br />
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /home/lajme2/public_html/yahoo/yosdk/lib/Yahoo.inc:1507) in <b>/home/lajme2/public_html/yahoo/yosdk/lib/Yahoo.inc</b> on line <b>341</b><br />
Any suggestions as what might be wrong?
I checked the Line 1507 and it seems a normal call on a return from the function below:
QUOTE
function hasAccessToken() {
1507: return array_key_exists("yosdk_at", $_SESSION) && (strlen($_SESSION["yosdk_at"]) > 0);
}