Development

#6751 (help guard:create-user issues a Notice - undefined variable word)

You must first sign up to be able to contribute.

Ticket #6751 (closed defect: fixed)

Opened 7 months ago

Last modified 7 months ago

help guard:create-user issues a Notice - undefined variable word

Reported by: antyqjon Assigned to: Jonathan.Wage
Priority: minor Milestone:
Component: sfDoctrineGuardPlugin Version: 1.2.7
Keywords: guard sfDoctrineGuardPlugin task help notice Cc:
Qualification: Unreviewed

Description

When running help for the sfDoctrineGuardUser plugin task guard:create-user, PHP issues a notice:

Notice: Undefined variable: word in D:\development\sfprojects\jobeet\lib\vendor\symfony\lib\task\sfTask.class.php(231) : regexp code on line 1

Call stack follows:

Call Stack:
    0.0009      52952   1. {main}() D:\development\sfprojects\jobeet\symfony:0
    0.0113     301880   2. include('D:\development\sfprojects\jobeet\lib\vendor\symfony\lib\command\cli.php') D:\development\sfprojects\jobeet\symfony:14
    1.1101    5112824   3. sfSymfonyCommandApplication->run() D:\development\sfprojects\jobeet\lib\vendor\symfony\lib\command\cli.php:20
    1.1229    5271320   4. sfTask->runFromCLI() D:\development\sfprojects\jobeet\lib\vendor\symfony\lib\command\sfSymfonyCommandApplication.class.php:72
    1.1235    5271664   5. sfTask->doRun() D:\development\sfprojects\jobeet\lib\vendor\symfony\lib\task\sfTask.class.php:75
    1.1239    5273008   6. sfHelpTask->execute() D:\development\sfprojects\jobeet\lib\vendor\symfony\lib\task\sfTask.class.php:294
    1.1248    5280344   7. sfTask->getDetailedDescription() D:\development\sfprojects\jobeet\lib\vendor\symfony\lib\task\help\sfHelpTask.class.php:95
    1.1248    5280344   8. preg_replace() D:\development\sfprojects\jobeet\lib\vendor\symfony\lib\task\sfTask.class.php:231
    1.1251    5282512   9. preg_replace() D:\development\sfprojects\jobeet\lib\vendor\symfony\lib\task\sfTask.class.php:231

IMHO the source of the problem lies in the file plugins/sfDoctrineGuardPlugin/lib/task/sfGuardCreateUserTask.class.php, at line 44 - dollar signs in pa$$word confuse the parser.

    $this->detailedDescription = <<<EOF
The [guard:create-user|INFO] task creates a user:

  [./symfony guard:create-user fabien pa\$\$word|INFO]
EOF;

My OS is Windows XP SP2, running PHP 5.2.5, symfony 1.2.7 with sfDoctrineGuardPlugin 3.0.0-stable.

Change History

07/04/09 22:40:22 changed by antyqjon

  • owner changed from fabien to Jonathan.Wage.
  • component changed from other to sfDoctrineGuardPlugin.

07/07/09 19:41:06 changed by Jonathan.Wage

  • status changed from new to closed.
  • resolution set to fixed.

Fixed by r19981

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting.
Sensio Labs also supports several large Open-Source projects.