Skip to content

Commit

Permalink
Merge pull request #7 from MasterSalomon/php-7.4
Browse files Browse the repository at this point in the history
Php 7.4
  • Loading branch information
pszalko authored Oct 1, 2021
2 parents 4f96702 + d96a2cf commit 7f40174
Show file tree
Hide file tree
Showing 75 changed files with 100 additions and 137 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"homepage": "https://github.com/mobtitude/zendframework1",
"license": "BSD-3-Clause",
"require": {
"php": ">=5.2.11"
"php": ">=5.2.2"
},
"autoload": {
"psr-0": {
Expand Down
5 changes: 5 additions & 0 deletions library/Zend/Amf/Adobe/Introspector.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ class Zend_Amf_Adobe_Introspector
*/
protected $_types;

/**
* @var DOMElement DOM element to store operations
*/
protected $_ops;

/**
* @var array Map of the known types
*/
Expand Down
1 change: 0 additions & 1 deletion library/Zend/Amf/Parse/Resource/MysqliResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ class Zend_Amf_Parse_Resource_MysqliResult
"MYSQLI_TYPE_CHAR" => 'string',
"MYSQLI_TYPE_VARCHAR" => 'string',
"MYSQLI_TYPE_GEOMETRY" => 'object',
"MYSQLI_TYPE_BIT" => 'integer',
);

/**
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Amf/Parse/Serializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ abstract class Zend_Amf_Parse_Serializer
*
* @var bool
*/
protected $mbStringFunctionsOverloaded;
protected $_mbStringFunctionsOverloaded;

/**
* Constructor
Expand Down
2 changes: 0 additions & 2 deletions library/Zend/Amf/Parse/TypeLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ final class Zend_Amf_Parse_TypeLoader
'flex.messaging.messages.AcknowledgeMessage' => 'Zend_Amf_Value_Messaging_AcknowledgeMessage',
'flex.messaging.messages.ErrorMessage' => 'Zend_Amf_Value_Messaging_AsyncMessage',
'flex.messaging.messages.CommandMessage' => 'Zend_Amf_Value_Messaging_CommandMessage',
'flex.messaging.messages.ErrorMessage' => 'Zend_Amf_Value_Messaging_ErrorMessage',
'flex.messaging.messages.RemotingMessage' => 'Zend_Amf_Value_Messaging_RemotingMessage',
'flex.messaging.io.ArrayCollection' => 'Zend_Amf_Value_Messaging_ArrayCollection',
);
Expand All @@ -76,7 +75,6 @@ final class Zend_Amf_Parse_TypeLoader
'flex.messaging.messages.AcknowledgeMessage' => 'Zend_Amf_Value_Messaging_AcknowledgeMessage',
'flex.messaging.messages.ErrorMessage' => 'Zend_Amf_Value_Messaging_AsyncMessage',
'flex.messaging.messages.CommandMessage' => 'Zend_Amf_Value_Messaging_CommandMessage',
'flex.messaging.messages.ErrorMessage' => 'Zend_Amf_Value_Messaging_ErrorMessage',
'flex.messaging.messages.RemotingMessage' => 'Zend_Amf_Value_Messaging_RemotingMessage',
'flex.messaging.io.ArrayCollection' => 'Zend_Amf_Value_Messaging_ArrayCollection',
);
Expand Down
6 changes: 3 additions & 3 deletions library/Zend/Amf/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ protected function _handle(Zend_Amf_Request $request)
$e->getCode(),
$e->getLine()
);
$responseType = Zend_AMF_Constants::STATUS_METHOD;
$responseType = Zend_Amf_Constants::STATUS_METHOD;
}
}

Expand Down Expand Up @@ -599,11 +599,11 @@ protected function _handle(Zend_Amf_Request $request)
}
break;
}
$responseType = Zend_AMF_Constants::RESULT_METHOD;
$responseType = Zend_Amf_Constants::RESULT_METHOD;
} catch (Exception $e) {
$return = $this->_errorMessage($objectEncoding, $message,
$e->getMessage(), $e->getTraceAsString(),$e->getCode(), $e->getLine());
$responseType = Zend_AMF_Constants::STATUS_METHOD;
$responseType = Zend_Amf_Constants::STATUS_METHOD;
}

$responseURI = $body->getResponseURI() . $responseType;
Expand Down
3 changes: 2 additions & 1 deletion library/Zend/Amf/Util/BinaryStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public function readByte()
);
}

return ord($this->_stream{$this->_needle++});
return ord($this->_stream[$this->_needle++]);
}

/**
Expand Down Expand Up @@ -223,6 +223,7 @@ public function writeLongUtf($stream)
{
$this->writeLong($this->_mbStringFunctionsOverloaded ? mb_strlen($stream, '8bit') : strlen($stream));
$this->_stream.= $stream;
return $this;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions library/Zend/Auth/Adapter/DbTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,9 @@ protected function _authenticateCreateSelect()
protected function _authenticateQuerySelect(Zend_Db_Select $dbSelect)
{
try {
if ($this->_zendDb->getFetchMode() != Zend_DB::FETCH_ASSOC) {
if ($this->_zendDb->getFetchMode() != Zend_Db::FETCH_ASSOC) {
$origDbFetchMode = $this->_zendDb->getFetchMode();
$this->_zendDb->setFetchMode(Zend_DB::FETCH_ASSOC);
$this->_zendDb->setFetchMode(Zend_Db::FETCH_ASSOC);
}
$resultIdentities = $this->_zendDb->fetchAll($dbSelect);
if (isset($origDbFetchMode)) {
Expand Down
9 changes: 4 additions & 5 deletions library/Zend/Auth/Adapter/OpenId.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,11 @@ public function authenticate() {
Zend_Auth_Result::SUCCESS,
$id,
array("Authentication successful"));
} else {
return new Zend_Auth_Result(
Zend_Auth_Result::FAILURE,
$id,
array("Authentication failed", $consumer->getError()));
}
return new Zend_Auth_Result(
Zend_Auth_Result::FAILURE,
$id,
array("Authentication failed", $consumer->getError()));
}
}

Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Barcode/Object/Code25.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function getChecksum($text)
$checksum = 0;

for ($i = strlen($text); $i > 0; $i --) {
$checksum += intval($text{$i - 1}) * $factor;
$checksum += intval($text[$i - 1]) * $factor;
$factor = 4 - $factor;
}

Expand Down
4 changes: 2 additions & 2 deletions library/Zend/Barcode/Object/Ean13.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public function getChecksum($text)
$checksum = 0;

for ($i = strlen($text); $i > 0; $i --) {
$checksum += intval($text{$i - 1}) * $factor;
$checksum += intval($text[$i - 1]) * $factor;
$factor = 4 - $factor;
}

Expand Down Expand Up @@ -196,7 +196,7 @@ protected function _drawEan13Text()
$leftPosition = $this->getQuietZone() - $characterWidth;
for ($i = 0; $i < $this->_barcodeLength; $i ++) {
$this->_addText(
$text{$i},
$text[$i],
$this->_fontSize * $this->_factor,
$this->_rotate(
$leftPosition,
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Barcode/Object/Ean5.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public function getChecksum($text)
$checksum = 0;

for ($i = 0 ; $i < $this->_barcodeLength; $i ++) {
$checksum += intval($text{$i}) * ($i % 2 ? 9 : 3);
$checksum += intval($text[$i]) * ($i % 2 ? 9 : 3);
}

return ($checksum % 10);
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Barcode/Object/Ean8.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ protected function _drawText()
$leftPosition = $this->getQuietZone() + (3 * $this->_barThinWidth) * $this->_factor;
for ($i = 0; $i < $this->_barcodeLength; $i ++) {
$this->_addText(
$text{$i},
$text[$i],
$this->_fontSize * $this->_factor,
$this->_rotate(
$leftPosition,
Expand Down
3 changes: 1 addition & 2 deletions library/Zend/Barcode/Object/Identcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ public function getTextToDisplay()
/**
* Check allowed characters
* @param string $value
* @return string
* @throws Zend_Barcode_Object_Exception
*/
public function validateText($value)
Expand All @@ -85,7 +84,7 @@ public function getChecksum($text)
$checksum = 0;

for ($i = strlen($text); $i > 0; $i --) {
$checksum += intval($text{$i - 1}) * (($i % 2) ? 4 : 9);
$checksum += intval($text[$i - 1]) * (($i % 2) ? 4 : 9);
}

$checksum = (10 - ($checksum % 10)) % 10;
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Barcode/Object/ObjectAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,7 @@ protected function _drawText()
for ($i = 0; $i < $textLength; $i ++) {
$leftPosition = $this->getQuietZone() + $space * ($i + 0.5);
$this->_addText(
$text{$i},
$text[$i],
$this->_fontSize * $this->_factor,
$this->_rotate(
$leftPosition,
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Barcode/Object/Upca.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ protected function _drawText()
$fontSize *= 0.8;
}
$this->_addText(
$text{$i},
$text[$i],
$fontSize * $this->_factor,
$this->_rotate(
$leftPosition,
Expand Down
10 changes: 5 additions & 5 deletions library/Zend/Barcode/Object/Upce.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ protected function _getDefaultOptions()
public function getText()
{
$text = parent::getText();
if ($text{0} != 1) {
$text{0} = 0;
if ($text[0] != 1) {
$text[0] = 0;
}
return $text;
}
Expand Down Expand Up @@ -158,7 +158,7 @@ protected function _drawText()
$fontSize *= 0.8;
}
$this->_addText(
$text{$i},
$text[$i],
$fontSize * $this->_factor,
$this->_rotate(
$leftPosition,
Expand Down Expand Up @@ -222,8 +222,8 @@ protected function _validateText($value, $options = array())
public function getChecksum($text)
{
$text = $this->_addLeadingZeros($text, true);
if ($text{0} != 1) {
$text{0} = 0;
if ($text[0] != 1) {
$text[0] = 0;
}
return parent::getChecksum($text);
}
Expand Down
10 changes: 5 additions & 5 deletions library/Zend/Cache/Backend/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -383,12 +383,12 @@ public function getFillingPercentage()
$total = disk_total_space($this->_options['cache_dir']);
if ($total == 0) {
Zend_Cache::throwException('can\'t get disk_total_space');
} else {
if ($free >= $total) {
return 100;
}
return ((int) (100. * ($total - $free) / $total));
}

if ($free >= $total) {
return 100;
}
return ((int) (100. * ($total - $free) / $total));
}

/**
Expand Down
2 changes: 0 additions & 2 deletions library/Zend/Cache/Backend/Sqlite.php
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,6 @@ private function _registerTag($id, $tag) {

/**
* Build the database structure
*
* @return false
*/
private function _buildStructure()
{
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Cloud/Infrastructure/Adapter/Ec2.php
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ public function imagesInstance()
public function zonesInstance()
{
if (!isset($this->ec2Zone)) {
$this->ec2Zone = new Zend_Service_Amazon_Ec2_AvailabilityZones($this->accessKey,$this->accessSecret,$this->region);
$this->ec2Zone = new Zend_Service_Amazon_Ec2_Availabilityzones($this->accessKey,$this->accessSecret,$this->region);
}
$this->adapterResult = $this->ec2Zone->describe();

Expand Down
1 change: 0 additions & 1 deletion library/Zend/Cloud/StorageService/Adapter/S3.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ public function deleteMetadata($path)
*
* @param string $path
* @param array $options
* @return void
*/
protected function _getFullPath($path, $options)
{
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/CodeGenerator/Php/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public static function fromReflection(Zend_Reflection_File $reflectionFile)
}
}
$body = implode("\n", $bodyReturn);
unset($bodyLines, $bodyReturn, $classStartLine, $classEndLine);
unset($bodyLines, $bodyReturn);
}

$file->setBody($body);
Expand Down
1 change: 0 additions & 1 deletion library/Zend/CodeGenerator/Php/Member/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ public function isAbstract()
* setFinal()
*
* @param bool $isFinal
* @return Zend_CodeGenerator_Php_Member_Abstract
*/
public function setFinal($isFinal)
{
Expand Down
1 change: 1 addition & 0 deletions library/Zend/CodeGenerator/Php/Method.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public static function fromReflection(Zend_Reflection_Method $reflectionMethod)
public function setFinal($isFinal)
{
$this->_isFinal = ($isFinal) ? true : false;
return $this;
}

/**
Expand Down
1 change: 0 additions & 1 deletion library/Zend/Config/Writer/Ini.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ public function render()
* Add a branch to an INI string recursively
*
* @param Zend_Config $config
* @return void
*/
protected function _addBranch(Zend_Config $config, $parents = array())
{
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Controller/Action/Helper/AjaxContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@ public function initContext($format = null)
return;
}

return parent::initContext($format);
parent::initContext($format);
}
}
2 changes: 1 addition & 1 deletion library/Zend/Controller/Request/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public function __set($key, $value)
*/
public function set($key, $value)
{
return $this->__set($key, $value);
$this->__set($key, $value);
}

/**
Expand Down
1 change: 0 additions & 1 deletion library/Zend/Date/Cities.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ class Zend_Date_Cities
'Glasgow' => array('latitude' => 55.8333333, 'longitude' => -4.25),
'Guatemala la Nueva' => array('latitude' => 14.6211111, 'longitude' => -90.5269444),
'Hagatna' => array('latitude' => 13.47417, 'longitude' => 144.74778),
'The Hague' => array('latitude' => 52.0833333, 'longitude' => 4.3),
'Hamilton' => array('latitude' => 32.2941667, 'longitude' => -64.7838889),
'Hanoi' => array('latitude' => 21.0333333, 'longitude' => 105.85),
'Harare' => array('latitude' => -17.8177778, 'longitude' => 31.0447222),
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Db/Adapter/Pdo/Sqlite.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function __construct(array $config = array())
$this->_config['username'] = null;
$this->_config['password'] = null;

return parent::__construct($config);
parent::__construct($config);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Db/Table/Row/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ public function setFromArray(array $data)
*/
public function refresh()
{
return $this->_refresh();
$this->_refresh();
}

/**
Expand Down
1 change: 0 additions & 1 deletion library/Zend/Dojo/BuildLayer.php
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,6 @@ public function generateBuildProfile()
* Retrieve module prefix
*
* @param string $module
* @return void
*/
protected function _getPrefix($module)
{
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Dojo/View/Helper/CustomDijit.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,6 @@ public function captureStart($id, array $params = array(), array $attribs = arra
$this->_module = $this->_defaultDojoType;
}

return parent::captureStart($id, $params, $attribs);
parent::captureStart($id, $params, $attribs);
}
}
2 changes: 1 addition & 1 deletion library/Zend/Feed/Entry/Atom.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function delete()
// Redirect
case 3:
$deleteUri = $response->getHeader('Location');
continue;
break;
// Error
default:
/**
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Filter/Compress/Zip.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public function decompress($content)
for ($i = 0; $i < $zip->numFiles; $i++) {
$statIndex = $zip->statIndex($i);
$currName = $statIndex['name'];
if (($currName{0} == '/') ||
if (($currName[0] == '/') ||
(substr($currName, 0, 2) == '..') ||
(substr($currName, 0, 4) == './..')
)
Expand Down
1 change: 0 additions & 1 deletion library/Zend/Filter/Inflector.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,6 @@ public function setFilterRule($spec, $ruleSet)
*
* @param mixed $spec
* @param mixed $ruleSet
* @return void
*/
public function addFilterRule($spec, $ruleSet)
{
Expand Down
Loading

0 comments on commit 7f40174

Please sign in to comment.