Skip to content

Commit

Permalink
fix: removed deprecated each and travis
Browse files Browse the repository at this point in the history
  • Loading branch information
G0-DVL authored Mar 5, 2019
1 parent 136735e commit 055a49d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 50 deletions.
44 changes: 0 additions & 44 deletions .travis.yml

This file was deleted.

9 changes: 5 additions & 4 deletions library/Zend/Cache/Backend.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,17 @@ public function __construct(array $options = array())
*/
public function setDirectives($directives)
{
if (!is_array($directives)) Zend_Cache::throwException('Directives parameter must be an array');
while (list($name, $value) = each($directives)) {
if (!is_array($directives)) {
Zend_Cache::throwException('Directives parameter must be an array');
}
foreach ($directives as $name => $value) {
if (!is_string($name)) {
Zend_Cache::throwException("Incorrect option name : $name");
}
$name = strtolower($name);
if (array_key_exists($name, $this->_directives)) {
$this->_directives[$name] = $value;
}

}

$this->_loggerSanity();
Expand Down Expand Up @@ -200,7 +201,7 @@ public function getTmpDir()
}
}
// Attemp to detect by creating a temporary file
$tempFile = tempnam(md5(uniqid(rand(), TRUE)), '');
$tempFile = tempnam(md5(uniqid(rand(), true)), '');
if ($tempFile) {
$dir = realpath(dirname($tempFile));
unlink($tempFile);
Expand Down
4 changes: 2 additions & 2 deletions tests/Zend/VersionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ public function testVersionCompare()
$expect = -1;
// unit test breaks if ZF version > 1.x
for ($i=0; $i <= 1; $i++) {
for ($j=0; $j <= 12; $j++) {
for ($k=0; $k < 20; $k++) {
for ($j=0; $j <= 13; $j++) {
for ($k=0; $k < 22; $k++) {
foreach (array('dev', 'pr', 'PR', 'alpha', 'a1', 'a2', 'beta', 'b1', 'b2', 'RC', 'RC1', 'RC2', 'RC3', '', 'pl1', 'PL1') as $rel) {
$ver = "$i.$j.$k$rel";
$normalizedVersion = strtolower(Zend_Version::VERSION);
Expand Down

0 comments on commit 055a49d

Please sign in to comment.