When creating a new support ticket the following message consistently occurs.
Undefined variable: client in _support_current_client()
(line 3890 of /surtsey/userdata/www/druplex/drupal-7.10/sites/all/modules/support/support.module).

CommentFileSizeAuthor
#4 Fix-1390156-1.patch1.27 KBAnonymous (not verified)

Comments

ssenator’s picture

Assigned: Unassigned » ssenator

assigning to self

otaci.martins’s picture

Same with me.

Repeatable: always

Steps to repeat:
1. Click "post new support ticket";
2. Fill the fields (title, ticket properties and body) normally;
3. Click "save" button;
4. And this message appears:

Notice: Undefined variable: client in _support_current_client() (line 3890 of .../sites/all/modules/support/support.module).
Notice: Undefined variable: client in _support_current_client() (line 3890 of .../sites/all/modules/support/support.module).

Expected results:
A new ticket created without this notice.

Actual results:
Fail to create a new ticket.

My specs:
Fedora 12 (2.6.31.5-127.fc12.i686 #1 SMP i686 i686 i386 GNU/Linux)
PostgreSQL 8.4.2
Apache 2.2.15
PHP 5.3.3
PHP error_reporting = E_ALL
Drupal 7.10

Last error from the Apache error log:
none after or related to actions described above

jrotondo’s picture

Priority: Minor » Major

This error is still occurring in the latest builds for Support Ticket and Drupal 7 core.

Anonymous’s picture

StatusFileSize
new1.27 KB

@Jeremy: A little fix for this. Please commit? Thx

Anonymous’s picture

Status: Active » Needs review
jrotondo’s picture

Patch in #4 works for me.

jeremy’s picture

Version: 7.x-1.0-beta3 » 7.x-1.x-dev
Status: Needs review » Postponed (maintainer needs more info)

I'm unable to duplicate. I'm testing with Drupal 7.12 and support-7.x-1.x-dev. Creating a support ticket works fine.

Have you first created a Client, per the documentation?

jeremy’s picture

Anonymous’s picture

@Jeremy: My patch on #4 was just by looking at the code, and enrusing the funcion ALWAYS defining $client first, and ALWAYS returning it (I've not tested the code, just patched to clear the given php Notice.

jeremy’s picture

Status: Postponed (maintainer needs more info) » Fixed

Figured out how to duplicate it; create 2+ clients and unset the support_client _SESSION variable.

Fix committed:
http://drupalcode.org/project/support.git/commit/ea9a4f1

Status: Fixed » Closed (fixed)

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