Skip to content

Declaring h function without checking if function_exists in VendorVersionsPanel.phtml #14

@SadeghPM

Description

@SadeghPM

Declaring h function without checking if function_exists in VendorVersionsPanel.phtml file, cause fatal error in some situation.

for example installing runtracy alongside robmorgan/phinx cause fatal error.

tracy:

<?php

use Tracy\Helpers;

function h($str) {
	return htmlspecialchars($str, ENT_QUOTES | ENT_HTML5, 'UTF-8');
}
...

robmorgan/phinx:

if (!function_exists('h')) {
    /**
     * Convenience method for htmlspecialchars.
     */
    function h($text, $double = true, $charset = null)
    {
...

For solving problem , please use if (!function_exists('h')) { to declare h function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions