Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Update library/Zend/Validator/Hostname.php #3445

Closed
wants to merge 1 commit into from

3 participants

Kristofer Karlsson Marco Pivetta Matthew Weier O'Phinney
Kristofer Karlsson

EdpSuperluminal fails due to faulty path.

Warning: include(Hostname/Com.php): failed to open stream: No such file or directory in /path/to/application/data/cache/classes.php.cache on line 2
Warning: include(): Failed opening 'Hostname/Com.php' for inclusion (include_path='.:/usr/local/share/pear') in /path/to/application/data/cache/classes.php.cache on line 2
Fatal error: Unsupported operand types in /path/to/application/data/cache/classes.php.cache on line 2

Marco Pivetta
Collaborator

@grizzm0 tests please!

Matthew Weier O'Phinney

The hostname validator relies on files that contain arrays of valid regexes for given TLDs. Those files are located in a subdirectory relative to the validator itself. This is why EdpSuperluminal fails in that regard.

@grizzm0 As @Ocramius noted, we need tests before we can accept this patch.

Kristofer Karlsson

@weierophinney rebased and tests passed.

Deleted user Unknown referenced this pull request from a commit
Matthew Weier O'Phinney weierophinney Merge branch 'hotfix/3445'
Close #3445
96b1469
Deleted user Unknown referenced this pull request from a commit
Matthew Weier O'Phinney weierophinney Merge branch 'hotfix/3445' into develop
Forward port #3445
31c2394
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 23, 2013
  1. Kristofer Karlsson
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  library/Zend/Validator/Hostname.php
2  library/Zend/Validator/Hostname.php
View
@@ -519,7 +519,7 @@ public function isValid($value)
$regexChars = array(0 => '/^[a-z0-9\x2d]{1,63}$/i');
if ($this->getIdnCheck() && isset($this->validIdns[strtoupper($this->tld)])) {
if (is_string($this->validIdns[strtoupper($this->tld)])) {
- $regexChars += include ($this->validIdns[strtoupper($this->tld)]);
+ $regexChars += include __DIR__ .'/'. $this->validIdns[strtoupper($this->tld)];
} else {
$regexChars += $this->validIdns[strtoupper($this->tld)];
}
Something went wrong with that request. Please try again.