FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=18198&edit=1

ID: 18198
Updated by: wenz@php.net
Reported By: rokxer at gmail dot com
Summary: Undefined offset: 0 Text/CAPTCHA/Driver/Figlet.php on
line 160
-Status: Open
+Status: Assigned
Type: Bug
Package: Text_CAPTCHA
Operating System: Ubuntu 10.06
Package Version: 0.4.1
PHP Version: 5.3.5
-Assigned To:
+Assigned To: wenz
Roadmap Versions:
New Comment:

-Status: Open
+Status: Assigned
-Assigned To:
+Assigned To: wenz



Previous Comments:
------------------------------------------------------------------------

[2011-01-17 13:16:06] #44d6405a1b2ed03fec5

Description:
------------
Undefined offset: 0 Text/CAPTCHA/Driver/Figlet.php on line 160 if error
reporting in php is turned on.

This is because $option[0] parameter is not set.
_____________________________________________

Text/CAPTCHA/Driver/Figlet.php (function _createPhrase($options))

158: $this->_phrase = Text_Password::create($this->_length,
$options[0]);
160: $this->_phrase = Text_Password::create($this->_length, $options[0],
$option[1]);

Change to:

158: $this->_phrase = Text_Password::create($this->_length,
isset($options[0])?$option[0]:null);
160: $this->_phrase =
Text_Password::create($this->_length,isset($options[0])?$option[0]:null,
isset($options[1])?$option[1]:null);

Test script:
---------------
Test script:
http://pear.11abacus.com/dev/doc/HTML/QuickForm/examples/qfcaptcha_form_figlet.php

Expected result:
----------------
No php error or warnings.

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedJan 17, '11 at 12:53p
activeJan 17, '11 at 12:53p
posts1
users1
websitepear.php.net

1 user in discussion

Wenz: 1 post

People

Translate

site design / logo © 2022 Grokbase