Bug #26660

imagecopyresized has invalid function parameter

Added by Benjamin Schulte about 10 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2011-05-06
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The class t3lib_stdgraphic provides the method imagecopyresized with a parameter list which defines the parameters $w and $h twice.

Due to this, it is impossible to create a mock of the stdGraphic class using PHPUnit.

In any way, I don't know how the method should work correctly.

function imagecopyresized(&$im, $cpImg, $Xstart, $Ystart, $cpImgCutX, $cpImgCutY, $w, $h, $w, $h)

Related issues

Related to TYPO3 Core - Bug #36947: GIFBUILDER render twiceClosedTYPO3 Release Team2012-05-08

Actions
Related to TYPO3 Core - Bug #39563: Regression in t3lib_iconWorks::imagecopyresizedClosed2012-08-06

Actions
#1

Updated by Mr. Hudson about 10 years ago

Patch set 1 of change Id43229caa3694e8859f9912946c963f907f92951 has been pushed to the review server.
It is available at http://review.typo3.org/2564

#2

Updated by Stefan Neufeind about 10 years ago

Quickly hacked together script to check for duplicate params. Detected two occurences of this here and didn't find something else on Core, extbase, fluid or FLOW3.

  1. search, leave out some comment-lines
    $ grep "function " -R * | grep -v \* >found

find-script:
$fp = fopen("found", "r");
while($s = fgets($fp)) {
$params = $s;
$pos = strpos($params, '(');
if($pos <= 0) continue;
$params = substr($params, $pos+1);

$pos = strpos($params, ')');
if($pos <= 0) continue;
$params = substr($params, 0, $pos);
$aParams = explode(',', $params);
$aParams = array_map('trim', $aParams);
if(count($aParams) != count(array_unique($aParams))) {
var_dump($s);
}
}
#3

Updated by Mr. Hudson almost 10 years ago

Patch set 2 of change Id43229caa3694e8859f9912946c963f907f92951 has been pushed to the review server.
It is available at http://review.typo3.org/2564

#4

Updated by Thorsten Kahler almost 10 years ago

  • Status changed from New to Needs Feedback
  • Assignee set to Benjamin Schulte

Does this grievance really produce any errors? From what I read from PHPDoc this is just a wrapper method for internal use and the duplicated variable names always should be assigned the same values.

#5

Updated by Mr. Jenkins over 9 years ago

  • Status changed from Needs Feedback to Under Review

Patch set 3 of change Id43229caa3694e8859f9912946c963f907f92951 has been pushed to the review server.
It is available at http://review.typo3.org/2564

#6

Updated by Mr. Jenkins over 9 years ago

Patch set 1 of change I00166cb30b278e1124675111d2cc3174811e4151 has been pushed to the review server.
It is available at http://review.typo3.org/6829

#7

Updated by Mr. Jenkins over 9 years ago

Patch set 1 of change Id43229caa3694e8859f9912946c963f907f92951 has been pushed to the review server.
It is available at http://review.typo3.org/6831

#8

Updated by Mr. Jenkins over 9 years ago

Patch set 1 of change Id43229caa3694e8859f9912946c963f907f92951 has been pushed to the review server.
It is available at http://review.typo3.org/6834

#9

Updated by Mr. Jenkins over 9 years ago

Patch set 4 of change Id43229caa3694e8859f9912946c963f907f92951 has been pushed to the review server.
It is available at http://review.typo3.org/2564

#10

Updated by Gerrit Code Review over 9 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/2564

#11

Updated by Gerrit Code Review over 9 years ago

Patch set 2 for branch TYPO3_4-4 has been pushed to the review server.
It is available at http://review.typo3.org/6834

#12

Updated by Gerrit Code Review over 9 years ago

Patch set 2 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/6831

#13

Updated by Gerrit Code Review over 9 years ago

Patch set 2 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/6829

#14

Updated by Gerrit Code Review over 9 years ago

Patch set 6 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/2564

#15

Updated by Gerrit Code Review over 9 years ago

Patch set 3 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/6829

#16

Updated by Gerrit Code Review over 9 years ago

Patch set 3 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/6831

#17

Updated by Gerrit Code Review over 9 years ago

Patch set 7 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/2564

#18

Updated by Gerrit Code Review over 9 years ago

Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/9608

#19

Updated by Stefan Neufeind over 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#20

Updated by Gerrit Code Review over 9 years ago

  • Status changed from Resolved to Under Review

Patch set 4 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/6829

#21

Updated by Gerrit Code Review over 9 years ago

Patch set 5 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/6829

#22

Updated by Gerrit Code Review almost 9 years ago

Patch set 6 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/6829

#23

Updated by Gerrit Code Review almost 9 years ago

Patch set 4 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/6831

#24

Updated by Stefan Neufeind over 8 years ago

  • Status changed from Under Review to Resolved
#25

Updated by Gerrit Code Review over 8 years ago

  • Status changed from Resolved to Under Review

Patch set 5 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/6831

#26

Updated by Stefan Neufeind over 8 years ago

  • Status changed from Under Review to Resolved
#27

Updated by Benni Mack over 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF