We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18010
    • 25 Posts
    В логах пишет:
    [error] PHP Parse error: syntax error, unexpected T_VARIABLE in /home/u97494/mainsolution.ru/www/manager/includes/document.parser.class.inc.php(745) : eval()’d code on line 51.
    Что делать? подскажите пожалуйста.

    а тут код со строки 46-56 файла document.parser.class.inc.php

    46            case ’ManagerAPI’ :
    47                if (!include_once MODX_BASE_PATH . ’manager/includes/extenders/manager.api.class.inc.php’)
    48                    return false;
    49               $this->manager= new ManagerAPI;
    50                return true;
    51                break;
    52
    53            default :
    54                return false;
    55       }
    56    }

    а тут код со строки 738-759 файла document.parser.class.inc.php

    738 function evalPlugin($pluginCode, $params) {
    739 $etomite= $modx= & $this;
    740 $modx->event->params= & $params; // store params inside event object
    741 if (is_array($params)) {
    742 extract($params, EXTR_SKIP);
    743 }
    744 ob_start();
    745 eval ($pluginCode);
    746 $msg= ob_get_contents();
    747 ob_end_clean();
    748 if ($msg && isset ($php_errormsg)) {
    749 if (!strpos($php_errormsg, ’Deprecated’)) { // ignore php5 strict errors
    750 // log error
    751 $this->logEvent(1, 3, "<b>$php_errormsg</b>

    $msg", $this->Event->activePlugin . " - Plugin");
    752 if ($this->isBackend())
    753 $this->Event->alert("An error occurred while loading. Please see the event log for more information.<p />$msg");
    754 }
    755 } else {
    756 echo $msg;
    757 }
    758 unset ($modx->event->params);
    759 }

    С уважением, Сергей Шаклеин.
      • 9198
      • 100 Posts
        • 2591
        • 10 Posts
        50-52 строчки плагина в студию
          If you send people to google, it means that you know nothing about question, so keep quiet, please...