Bug #26091
closedCall to stdWrap() of non-existant $this->cObj in GifBuilder
100%
Description
A PHP Fatal Error occurs in tslib_gifBuilder::checkTextObj()
, because $this->cObj
is not set, however this->cObj->stdWrap()
is called.
A few lines later, a local variable $cObj
is initialized.
function checkTextObj($conf) { 1 $isStdWrapped = array(); 2 foreach($conf as $key => $value) { 3 $parameter = rtrim($key,'.'); 4 if(!$isStdWrapped[$parameter] && isset($conf[$parameter.'.'])) { 5 $conf[$parameter] = $this->cObj->stdWrap($conf[$parameter], $conf[$parameter.'.']); 6 $isStdWrapped[$parameter] = 1; 7 } 8 } ... 17 $cObj =t3lib_div::makeInstance('tslib_cObj'); 18 $cObj->start($this->data);
(call in line 5)
Updated by Steffen Gebert over 13 years ago
I'm trying to strip the TS setup down to have a minimal setup to reproduce this issue.
Updated by Steffen Gebert over 13 years ago
Code to reproduce:
page.2 = HMENU page.2.entryLevel = 0 page.2.1 = IMGMENU page.2.1 { dWorkArea = 00,00 main.XY = 700,30 main.10 = IMAGE NO { distrib = textX + 20,00 20 = TEXT 20 { text.field = title offset = 10,10 } } }
Updated by Mr. Hudson over 13 years ago
Patch set 1 of change Ia6fb6a57ba5e4c4bf83e54d720bd1353143ab66d has been pushed to the review server.
It is available at http://review.typo3.org/1651
Updated by Steffen Gebert over 13 years ago
An alternative would be to call tslib_gifBuilder::start()
before the call to checkTextObj()
, however then the start()
method is called twice (in tslib_menu::makeImageMap()
).
Updated by Mr. Hudson over 13 years ago
Patch set 2 of change Ia6fb6a57ba5e4c4bf83e54d720bd1353143ab66d has been pushed to the review server.
It is available at http://review.typo3.org/1651
Updated by Steffen Gebert over 13 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Applied in changeset 93f8afc6770edfc61e4eb1177ced0f0f6d803c8b.
Updated by Steffen Gebert about 13 years ago
- Category set to Image Cropping
- Assignee set to Steffen Gebert
- Target version set to 4.5.5
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed