Project

General

Profile

Actions

Bug #17381

closed

"patch" for Hook-TutorialArticle - page 3

Added by Daniel Brüßler over 17 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Documentation
Target version:
-
Start date:
2007-06-13
Due date:
% Done:

0%

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

Description

There's a little typo in the Hook-Tutorial, because of that some extensions have that error. But in PHP 5.2.3 this leads to big problems with some extensions.

http://typo3.org/development/articles/how-to-use-existing-hooks/page/3/

Instead of this
++------------
Finally we create an empty function in our new classed, with exactly the same name mentioned in the hook. Our class should now look like this:

class tx_myextension_tcemainprocdm {

function processDatamap_postProcessFieldArray ($status, $table, $id, &$fieldArray, &$this) {
// here comes the code
}

}
++------------

it should be that

++------------
Finally we create an empty function in our new classed, with exactly the same name mentioned in the hook. Our class should now look like this:

class tx_myextension_tcemainprocdm {

function processDatamap_postProcessFieldArray ($status, $table, $id, &$fieldArray, &$reference) {
// here comes the code
}

}
++------------

The error-message just occurs since using 5.2.3

for example in the EXT cal 0.15.1
+------------
$this in /home/www/danielbruessler.de/public_html/typo3conf/ext/cal/hooks/class.tx_cal_tcemain_processdatamap.php on line 36
+------------

I check more extensions what have that error and report the bugs as patches.
(issue imported from #M5787)

Actions #1

Updated by Steffen Kamper over 17 years ago

Yes, very good.

may be choose a better naming
- $referenceObject
- $parentObject
- $parentClass

to help identify the object.

Actions #2

Updated by Alexander Opitz about 11 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)
  • TYPO3 Version set to 4.0

Hi,

as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (4.5 or 6.1)?

Actions #3

Updated by Alexander Opitz almost 11 years ago

  • Status changed from Needs Feedback to Closed
  • Is Regression set to No

No feedback within the last 90 days => closing this ticket.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Actions

Also available in: Atom PDF