CentralNIC の NET_EPP ライブラリを使用しています ( https://github.com/centralnic/php-epp/ ) ある時点で、スクリプトが呼び出します
@$frame = new \Net_EPP_Frame_Command_Login(); //the EPP framework throws a warning otherwise
行の先頭にある @ に注意してください。これは、サード パーティのライブラリによってスローされる警告を抑制する目的で行われます。
したがって、Net_EPP_Frame_Command_Login のコンストラクターは、その親コンストラクターを呼び出します。
class Net_EPP_Frame_Command_Login extends Net_EPP_Frame_Command {
function __construct() {
parent::__construct('login');
それは次のように見えます
class Net_EPP_Frame_Command extends Net_EPP_Frame {
function __construct($command, $type) {
$this->type = $type;
この部分では、2 つの警告が表示されます -
WARNING: Missing argument 2 for Net_EPP_Frame_Command::__construct()
NOTICE: Undefined variable: type
ライブラリを変更せずにこれらの警告を抑制するにはどうすればよいですか?
アップデート
興味深いことに、サーバーに直接話しかけても警告は表示されませんが、curl を使用してページのコンテンツを取得すると表示されます。
$args = array("domainName" => $_POST['domain'], "tld" => $_POST['tld']);
$action = "CheckAvailabilityActionByModule";
$msg = new CommsMessage($action,$args);
$reply = TestServer::main($msg->encode());
$reply = CommsMessage::decodeReply($reply);
サーバーと直接話しているため、正常に動作します。しかし
$reply = $client->getAvailabilityByModule($_POST['domain'], $_POST['tld']);
このリクエストはcurlを介して行われるため、そうではありません