TYPO3 Forge: Issueshttp://forge.typo3.org/http://forge.typo3.org/themes/typo3_forge/favicon/favicon.png?17058661692020-01-29T12:58:15ZTYPO3 Forge
Redmine TYPO3 Core - Bug #90241 (Closed): ArrayUtility "array_key_exists() expects parameter 2 to be array"http://forge.typo3.org/issues/902412020-01-29T12:58:15ZDaniel Siepmanncoding@daniel-siepmann.de
<p>Inside <em>\TYPO3\CMS\Core\Utility\ArrayUtility::getValueByPath()</em> no type check is executed when working with array.<br />This can lead to the PHP warning "array_key_exists() expects parameter 2 to be array".<br />Example call causing the warning:</p>
<pre><code class="php syntaxhl" data-language="php"><span class="nc">\TYPO3\CMS\Core\Utility\ArrayUtility</span><span class="o">::</span><span class="nf">getValueByPath</span><span class="p">(</span>
<span class="p">[</span>
<span class="s1">'foo'</span> <span class="o">=></span> <span class="p">[</span>
<span class="s1">'baz'</span> <span class="o">=></span> <span class="mi">42</span>
<span class="p">],</span>
<span class="p">],</span>
<span class="s1">'foo/baz/baz'</span>
<span class="p">);</span>
</code></pre>
<p>as during 2nd baz, the "array" is an integer.</p>
<p>The expected behaviour would be <em>throw new MissingArrayPathException('Segment ' . $segment . ' of path ' . implode($delimiter, $path) . ' does not exist in array', 1341397869);</em>, just like when the segment does not exist. As it does not exist.</p> TYPO3 Core - Bug #89980 (Closed): Numeric keys in $_SERVER array lead to type errorhttp://forge.typo3.org/issues/899802019-12-17T22:16:32ZDaniel Siepmanncoding@daniel-siepmann.de
<p>Calling whatever URL results in the following error:</p>
<pre>
TypeError
strpos() expects parameter 1 to be string, int given
</pre>
<p>In order to create the error the Variable <em>$_SERVER['1']</em> can be set.</p>
<p>The error is created in in /home/daniels/Projects/own/website-typo3/project/private/typo3/sysext/core/Classes/Http/ServerRequestFactory.php line 101:</p>
<pre>
protected static function prepareHeaders(array $server)
{
$headers = [];
foreach ($server as $key => $value) {
if (strpos($key, 'HTTP_COOKIE') === 0) {
// Cookies are handled using the $_COOKIE superglobal
continue;
}
</pre> TYPO3 Core - Bug #89913 (Closed): Fix CGLhttp://forge.typo3.org/issues/899132019-12-11T08:31:28ZDaniel Siepmanncoding@daniel-siepmann.de
<p>New php cs fixer broke the builds: <a class="external" href="https://bamboo.typo3.com/browse/CORE-GTN87-CGLCHECK-931/log">https://bamboo.typo3.com/browse/CORE-GTN87-CGLCHECK-931/log</a></p> TYPO3 Core - Bug #89583 (Closed): 2nd double Quote in error messagehttp://forge.typo3.org/issues/895832019-11-05T09:54:04ZDaniel Siepmanncoding@daniel-siepmann.de
<p>There is a 2nd double quote in exception 1436717266, which might lead to confusion whether it is part of the dynamic value within the exception.</p> TYPO3 Core - Bug #89432 (Closed): Fix Extbase redirect param type annotationhttp://forge.typo3.org/issues/894322019-10-16T15:33:20ZDaniel Siepmanncoding@daniel-siepmann.de
<p>Right now the method accepts strings and nulls for some arguments, but only string is defined within PHPDoc.</p>
<p>This prevents static code analysis for further code using this method, e.g. inside extensions.</p> TYPO3 Core - Bug #89419 (Closed): EXT:backend depends on EXT:install for environment routes, but ...http://forge.typo3.org/issues/894192019-10-15T13:17:01ZDaniel Siepmanncoding@daniel-siepmann.de
<p>EXT:install is defining route tools_toolsenvironment while this is used by EXT:backend. Still I can not see a requires to ext install from ext backend.</p>
<pre>
ag "tools_toolsenv"
typo3/sysext/backend/Resources/Private/Templates/ToolbarItems/SystemInformationDropDown.html
8:<p class="dropdown-text typo3-module-menu-item submodule mod-tools_toolsenvironment" data-modulename="tools_toolsenvironment">
typo3/sysext/backend/Classes/Backend/ToolbarItems/SystemInformationToolbarItem.php
173: 'environmentToolUrl' => (string)$uriBuilder->buildUriFromRoute('tools_toolsenvironment'),
typo3/sysext/install/ext_tables.php
51: 'name' => 'tools_toolsenvironment',
</pre>
<p>Possible solution:</p>
<blockquote>
<p>a.fernandez 1:12 PM<br />I think this requires two steps:<br />1) generate and render the link only if the route exists (try/catch on RouteNotFoundException or alike)<br />2) add EXT:install as suggestion</p>
</blockquote> TYPO3 Core - Task #89409 (Closed): Fix Extbase getArgument return type annotationhttp://forge.typo3.org/issues/894092019-10-14T13:32:50ZDaniel Siepmanncoding@daniel-siepmann.de
<p>Right now the method can return whatever an argument is, but only string is defined within PHPDoc. E.g. arguments can be an array instead.</p>
<p>This prevents static code analysis for further code using this method, e.g. inside extensions.</p> TYPO3 Core - Task #89407 (Closed): Fix get_dirs return type annotationhttp://forge.typo3.org/issues/894072019-10-14T10:56:09ZDaniel Siepmanncoding@daniel-siepmann.de
<p>Right now the method can return either an array, null or an string, but only array is defined within PHPDoc.</p>
<p>This prevents static code analysis for further code using this method, e.g. inside extensions.</p> TYPO3 Core - Task #89019 (Closed): Fix legacy FQCN in php dochttp://forge.typo3.org/issues/890192019-08-26T18:00:53ZDaniel Siepmanncoding@daniel-siepmann.de
<p><em>\TYPO3\CMS\Extbase\Mvc\View\JsonView</em> still has a reference to FLOW3 within phpdoc, instead reference itself.</p> TYPO3 Core - Bug #87315 (Rejected): TypeError in RecordStateFactoryhttp://forge.typo3.org/issues/873152019-01-02T07:27:36ZDaniel Siepmanncoding@daniel-siepmann.de
<p>$this->resolveAspectFieldNames() may return null instead of empty strings, but only strings are accepted in array_map callback function within resolveAspectFieldValues, leading to an TypeError with PHP 7.2.</p>
<p>Stacktrace:</p>
<pre>
(1/1) TypeError
Argument 1 passed to TYPO3\CMS\Core\DataHandling\Model\RecordStateFactory::TYPO3\CMS\Core\DataHandling\Model\{closure}() must be of the type string, null given
in /home/daniels/Projects/company/example-project/htdocs/web/typo3/sysext/core/Classes/DataHandling/Model/RecordStateFactory.php line 103
*/
protected function resolveAspectFieldValues(array $data): array
{
return array_map(
function (string $aspectFieldName) use ($data) {
return (int)($data[$aspectFieldName] ?? 0);
},
$this->resolveAspectFieldNames()
);
at TYPO3\CMS\Core\DataHandling\Model\RecordStateFactory->TYPO3\CMS\Core\DataHandling\Model\{closure}(null)
at array_map(object(Closure), array('workspace' => 't3ver_wsid', 'versionParent' => 't3ver_oid', 'language' => 'sys_language_uid', 'languageParent' => 'l10n_parent', 'languageSource' => null))
in /home/daniels/Projects/company/example-project/htdocs/web/typo3/sysext/core/Classes/DataHandling/Model/RecordStateFactory.php line 106
return array_map(
function (string $aspectFieldName) use ($data) {
return (int)($data[$aspectFieldName] ?? 0);
},
$this->resolveAspectFieldNames()
);
}
/**
</pre> TYPO3 Core - Bug #86855 (Closed): Streamline ViewHelper PHPDoc formathttp://forge.typo3.org/issues/868552018-11-05T18:13:12ZDaniel Siepmanncoding@daniel-siepmann.de
<p>Right now it's nearly plain text with HTML Markup.</p>
<p>We should decide for a single format, e.g. markdown or rst and format all docs to this format, in order to generate proper documentation.</p> TYPO3 Core - Bug #86592 (Closed): Argument 2 passed to TYPO3\CMS\Extbase\Routing\ExtbasePluginEnh...http://forge.typo3.org/issues/865922018-10-08T10:06:19ZDaniel Siepmanncoding@daniel-siepmann.de
<p>Given the following routing configuration:<br /><pre><code class="yaml syntaxhl" data-language="yaml"><span class="na">routeEnhancers</span><span class="pi">:</span>
<span class="na">ExamplePlugin</span><span class="pi">:</span>
<span class="na">type</span><span class="pi">:</span> <span class="s">Extbase</span>
<span class="na">extension</span><span class="pi">:</span> <span class="s">ExampleExtension</span>
<span class="na">plugin</span><span class="pi">:</span> <span class="s">Address</span>
<span class="na">defaultController</span><span class="pi">:</span> <span class="s1">'</span><span class="s">Address::index'</span>
<span class="na">routes</span><span class="pi">:</span>
<span class="pi">-</span>
<span class="na">routePath</span><span class="pi">:</span> <span class="s1">'</span><span class="s">/edit/{address}'</span>
<span class="na">_controller</span><span class="pi">:</span> <span class="s1">'</span><span class="s">Address::edit'</span>
<span class="na">_arguments</span><span class="pi">:</span>
<span class="s1">'</span><span class="s">address'</span><span class="err">:</span> <span class="s1">'</span><span class="s">address'</span>
<span class="pi">-</span>
<span class="na">routePath</span><span class="pi">:</span> <span class="s1">'</span><span class="s">/update'</span>
<span class="na">_controller</span><span class="pi">:</span> <span class="s1">'</span><span class="s">Address::update'</span>
<span class="na">aspects</span><span class="pi">:</span>
<span class="na">address</span><span class="pi">:</span>
<span class="na">type</span><span class="pi">:</span> <span class="s">PersistedPatternMapper</span>
<span class="na">tableName</span><span class="pi">:</span> <span class="s1">'</span><span class="s">tx_exampleextension_domain_model_address'</span>
<span class="na">routeFieldPattern</span><span class="pi">:</span> <span class="s1">'</span><span class="s">^(?P<company_name>.+)-(?P<uid>\d+)$'</span>
<span class="na">routeFieldResult</span><span class="pi">:</span> <span class="s1">'</span><span class="s">{company_name}-{uid}'</span>
</code></pre></p>
<p>and submitting the edit form, results in the url <em><a class="external" href="https://workshop-extension.at.localhost/plugin/update">https://workshop-extension.at.localhost/plugin/update</a></em> and the error:<br /><pre>
Argument 2 passed to TYPO3\CMS\Extbase\Routing\ExtbasePluginEnhancer::applyControllerActionValues() must be of the type array, null given
</pre></p> TYPO3 Core - Bug #85771 (Closed): Improve readability of Changeloghttp://forge.typo3.org/issues/857712018-08-07T12:59:30ZDaniel Siepmanncoding@daniel-siepmann.de
<p>Some rst files contain syntax issues, like <a class="external" href="https://docs.typo3.org/typo3cms/extensions/core/latest/Changelog/8.1/Breaking-75357-TYPO3_CONF_VARSBElockSSLOptionIsBoolean.html">https://docs.typo3.org/typo3cms/extensions/core/latest/Changelog/8.1/Breaking-75357-TYPO3_CONF_VARSBElockSSLOptionIsBoolean.html</a> where a blink line is missing to render the lists properly.</p>
<p>Also some links to issues are missing and syntax highlighting is not used for files and php code.</p>
<p>In some places $GLOBALS is missing for TYPO3_CONF_VARS.</p> TYPO3 Core - Bug #62536 (Closed): Extbase TypeConverter Integer can't work with null anymorehttp://forge.typo3.org/issues/625362014-10-29T15:27:09ZDaniel Siepmanncoding@daniel-siepmann.de
<p>While migrating our TYPO3 4.7 instance to 6.2 we found out that the new TypeConverter for integers can't convert "null" anymore.</p>
<p>This is the old code:<br /><pre>
public function convertFrom($source, $targetType, array $convertedChildProperties = array(), \TYPO3\CMS\Extbase\Property\PropertyMappingConfigurationInterface $configuration = NULL) {
if ($source === NULL || strlen($source) === 0) {
return NULL;
}
if (!is_numeric($source)) {
return new \TYPO3\CMS\Extbase\Error\Error('"%s" is no integer.', 1332933658, array($source));
}
return (int)$source;
}
</pre><br />And the new one:<br /><pre>
public function convertFrom($source, $targetType, array $convertedChildProperties = array(), \TYPO3\CMS\Extbase\Property\PropertyMappingConfigurationInterface $configuration = NULL) {
if (strtolower($source) === "null" || $source === NULL || strlen($source) === 0) {
return NULL;
}
if (!is_numeric($source)) {
return new \TYPO3\CMS\Extbase\Error\Error('"%s" is no integer.', 1332933658, array($source));
}
return (int)$source;
}
</pre></p>
<p>The file is located under <em>/typo3/sysext/extbase/Classes/Property/TypeConverter/IntegerConverter.php</em>.</p>
<p>The problem is that null as a string can't be converted to null. This worked in 4.7 and is a breaking change for our extensions.</p>
<p>If this is behavior is intended, where is the change documented?<br />Looks like the following commit introduced this: <a class="external" href="https://git.typo3.org/Packages/TYPO3.CMS.git/blobdiff/c60a671bb5d7e4b21ef55ffee0028b32d66cad55..8c3f329a18b9496d270ae2467025bf3fee720c49:/typo3/sysext/extbase/Classes/Property/TypeConverter/IntegerConverter.php">https://git.typo3.org/Packages/TYPO3.CMS.git/blobdiff/c60a671bb5d7e4b21ef55ffee0028b32d66cad55..8c3f329a18b9496d270ae2467025bf3fee720c49:/typo3/sysext/extbase/Classes/Property/TypeConverter/IntegerConverter.php</a> So FLOW differs from the old Extbase way. Perhaps the context is different and the string is managed before inside FLOW?</p> TYPO3 Core - Bug #55517 (Closed): ClassLoader not working with NullBackend for legacy classes http://forge.typo3.org/issues/555172014-01-31T14:58:05ZDaniel Siepmanncoding@daniel-siepmann.de
<p>Setting <em>cache_core</em> to <em>NullBackend</em><br /><pre>
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_core']['backend'] = '\TYPO3\CMS\Core\Cache\Backend\NullBackend';
</pre> <br />creates Fatal Errors for calls to old class names like <em>t3lib_extMgm</em>.<br />You can reproduce it e.g. with a call to the <em>t3lib_extMgm</em> class inside <em>ext_tables.php</em> of an extension.</p>
<p>This error is not catched using the <em>Install Tool</em> <em>Check for broken extensions</em> option.</p>