Bug #26091
closed
Call to stdWrap() of non-existant $this->cObj in GifBuilder
Added by Steffen Gebert about 13 years ago.
Updated over 6 years ago.
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)
I'm trying to strip the TS setup down to have a minimal setup to reproduce this issue.
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
}
}
}
Patch set 1 of change Ia6fb6a57ba5e4c4bf83e54d720bd1353143ab66d has been pushed to the review server.
It is available at http://review.typo3.org/1651
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()
).
Patch set 2 of change Ia6fb6a57ba5e4c4bf83e54d720bd1353143ab66d has been pushed to the review server.
It is available at http://review.typo3.org/1651
- Status changed from New to Resolved
- % Done changed from 0 to 100
- Category set to Image Cropping
- Assignee set to Steffen Gebert
- Target version set to 4.5.5
- Status changed from Resolved to Closed
Also available in: Atom
PDF