Problem/Motivation

I got the following error when attempting to associate a new provider for the first time:

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'assoc_handle' cannot be null: INSERT INTO {openid_association} (idp_endpoint_uri, session_type, assoc_handle, assoc_type, expires_in, mac_key, created) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6); Array ( [:db_insert_placeholder_0] => http://mysite.local/openid/provider [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => [:db_insert_placeholder_3] => [:db_insert_placeholder_4] => [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => 1331566173 ) in openid_association() (line 641 of /.../modules/openid/openid.module).

When I tried to check for the contents of $assoc_response, the following error was raised: Call to undefined function drupal_set_header() in /.../sites/all/modules/openid_provider/openid_provider.inc on line 22

Proposed resolution

The solution, as detailed on http://drupal.org/node/1101500 was simply to replace the following lines on openid_provider.inc:

drupal_set_header('HTTP/1.1 200 OK');
drupal_set_header("Content-Type: text/plain");
drupal_set_header('Content-Length: '. strlen($message));
drupal_set_header('Connection: close');

to their D7 equivalent

drupal_add_http_header('HTTP/1.1 200 OK');
drupal_add_http_header("Content-Type: text/plain");
drupal_add_http_header('Content-Length: '. strlen($message));
drupal_add_http_header('Connection: close');

Comments

anarcat’s picture

Status: Active » Fixed

fixed in rc4.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Corrected array name ($assoc_responsed --> $assoc_response)