Right now, views_plugin_argument_validate_php::options_form says

You may change the argument by setting "$handler->argument".

.
Compare to

  function validate_argument($argument) {
    // set up variables to make it easier to reference during the argument.
    $view = &$this->view;
    $handler = &$this->argument;

    ob_start();
    $result = eval($this->options['code']);
    ob_end_clean();
    return $result;
  }

Is it just me who does not see a $handler? On the other hand, $argument->argument exists and I think this is what the text wanted to say.

CommentFileSizeAuthor
#3 there_is_a_handler.patch1.4 KBchx
there_is_no_handler.patch1.4 KBchx

Comments

Letharion’s picture

Assigned: Unassigned » merlinofchaos

Assigning to merlin since it's a D6 issue.

dawehner’s picture

I'm really confused.

A quote from your code:

    $handler = &$this->argument;

$this is the plugin, $this->argument is the argument handler, and $this->argument->argument alias $handler->argument is the value of the argument.

chx’s picture

Title: There is no handler in the PHP validator » There is no argument object in the PHP validator
Assigned: merlinofchaos » Unassigned
StatusFileSize
new1.4 KB

OK, I had this backwards. There is a $handler. What there is not is a $argument object and so the validate_title is wrong.

dawehner’s picture

Status: Needs review » Fixed

Commited to 6.x-3.x and 7.x-3.x. Thanks!

Status: Fixed » Closed (fixed)

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