Project

General

Profile

Actions

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.

Status:
Closed
Priority:
Should have
Category:
Image Cropping
Target version:
Start date:
2011-04-18
Due date:
% Done:

100%

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

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)


Related issues 1 (0 open1 closed)

Follows TYPO3 Core - Feature #24090: Optimize stdWrap usage for GIFBUILDERClosedSusanne Moog2010-11-17

Actions
Actions #1

Updated by Steffen Gebert about 13 years ago

I'm trying to strip the TS setup down to have a minimal setup to reproduce this issue.

Actions #2

Updated by Steffen Gebert about 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
    }
  }
}
Actions #3

Updated by Mr. Hudson about 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

Actions #4

Updated by Steffen Gebert about 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()).

Actions #5

Updated by Mr. Hudson almost 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

Actions #6

Updated by Steffen Gebert almost 13 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100
Actions #7

Updated by Steffen Gebert almost 13 years ago

  • Category set to Image Cropping
  • Assignee set to Steffen Gebert
  • Target version set to 4.5.5
Actions #8

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF