Project

General

Profile

Actions

Bug #17381

closed

"patch" for Hook-TutorialArticle - page 3

Added by Daniel Brüßler almost 17 years ago. Updated over 10 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

Also available in: Atom PDF