Bug #26660
imagecopyresized has invalid function parameter
| Status: | Resolved | Start date: | 2011-05-06 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | Benjamin Schulte | % Done: | 100% |
|
| Category: | - | |||
| Target version: | - | |||
| TYPO3 Version: | 4.5 | Complexity: | ||
| PHP Version: | ||||
| Votes: | 0 |
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 Core - Bug #36947: GIFBUILDER render twice | Resolved | 2012-05-08 | ||
| related to Core - Bug #39563: Regression in t3lib_iconWorks::imagecopyresized | Resolved | 2012-08-06 |
Associated revisions
[BUGFIX] imagecopyresized: correct invalid parameters
The classes t3lib_stdgraphic and t3lib_iconworks provide
the method imagecopyresized. Those functions got parameters
$w, $h twice in the function-header and therefore the function
only worked in "special cases".
This patch also adds a docblock and improves the (internal)
naming of the variables.
Change-Id: Id43229caa3694e8859f9912946c963f907f92951
Fixes: #26660
Releases: 4.4, 4.5, 4.6, 4.7
Reviewed-on: http://review.typo3.org/2564
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Philipp Gampe
Reviewed-by: Stefan Neufeind
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
[BUGFIX] imagecopyresized: correct invalid parameters
The classes t3lib_stdgraphic and t3lib_iconworks provide
the method imagecopyresized. Those functions got parameters
$w, $h twice in the function-header and therefore the function
only worked in "special cases".
This patch also adds a docblock and improves the (internal)
naming of the variables.
Change-Id: Id43229caa3694e8859f9912946c963f907f92951
Fixes: #26660
Releases: 4.4, 4.5, 4.6, 4.7
Reviewed-on: http://review.typo3.org/9608
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
[BUGFIX] imagecopyresized: correct invalid parameters
The classes t3lib_stdgraphic and t3lib_iconworks provide
the method imagecopyresized. Those functions got parameters
$w, $h twice in the function-header and therefore the function
only worked in "special cases".
This patch also adds a docblock and improves the (internal)
naming of the variables.
Change-Id: I00166cb30b278e1124675111d2cc3174811e4151
Resolves: #26660
Releases: 4.4, 4.5, 4.6, 4.7
Reviewed-on: http://review.typo3.org/6829
Reviewed-by: Wouter Wolters
Reviewed-by: Andreas Bouche
Tested-by: Andreas Bouche
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
[BUGFIX] imagecopyresized: correct invalid parameters
The classes t3lib_stdgraphic and t3lib_iconworks provide
the method imagecopyresized. Those functions got parameters
$w, $h twice in the function-header and therefore the function
only worked in "special cases".
This patch also adds a docblock and improves the (internal)
naming of the variables.
Change-Id: Id43229caa3694e8859f9912946c963f907f92951
Resolves: #26660
Releases: 4.5, 4.6, 4.7
Reviewed-on: http://review.typo3.org/6831
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
History
Updated by Mr. Hudson almost 2 years ago
Patch set 1 of change Id43229caa3694e8859f9912946c963f907f92951 has been pushed to the review server.
It is available at http://review.typo3.org/2564
Updated by Stefan Neufeind almost 2 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.
- 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);
}
}Updated by Mr. Hudson almost 2 years ago
Patch set 2 of change Id43229caa3694e8859f9912946c963f907f92951 has been pushed to the review server.
It is available at http://review.typo3.org/2564
Updated by Thorsten Kahler almost 2 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.
Updated by Mr. Jenkins over 1 year 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
Updated by Mr. Jenkins over 1 year ago
Patch set 1 of change I00166cb30b278e1124675111d2cc3174811e4151 has been pushed to the review server.
It is available at http://review.typo3.org/6829
Updated by Mr. Jenkins over 1 year ago
Patch set 1 of change Id43229caa3694e8859f9912946c963f907f92951 has been pushed to the review server.
It is available at http://review.typo3.org/6831
Updated by Mr. Jenkins over 1 year ago
Patch set 1 of change Id43229caa3694e8859f9912946c963f907f92951 has been pushed to the review server.
It is available at http://review.typo3.org/6834
Updated by Mr. Jenkins over 1 year ago
Patch set 4 of change Id43229caa3694e8859f9912946c963f907f92951 has been pushed to the review server.
It is available at http://review.typo3.org/2564
Updated by Gerrit Code Review over 1 year ago
Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/2564
Updated by Gerrit Code Review over 1 year 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
Updated by Gerrit Code Review over 1 year 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
Updated by Gerrit Code Review over 1 year 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
Updated by Gerrit Code Review over 1 year ago
Patch set 6 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/2564
Updated by Gerrit Code Review over 1 year 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
Updated by Gerrit Code Review over 1 year 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
Updated by Gerrit Code Review over 1 year ago
Patch set 7 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/2564
Updated by Gerrit Code Review about 1 year 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
Updated by Stefan Neufeind about 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 98f73d8b175fa2805bf77d111cbb87cf7aa04ae7.
Updated by Gerrit Code Review about 1 year 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
Updated by Gerrit Code Review about 1 year 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
Updated by Gerrit Code Review 10 months 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
Updated by Gerrit Code Review 10 months 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
Updated by Stefan Neufeind 7 months ago
- Status changed from Under Review to Resolved
Applied in changeset 1af5018d89cab1e3b7708f2e9185cefba32b5284.
Updated by Gerrit Code Review 6 months 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
Updated by Stefan Neufeind 6 months ago
- Status changed from Under Review to Resolved
Applied in changeset 56e66659ee444105d5b91cc8ec1e36807909d404.