Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php namespace Drupal\Core\Form\Exception; use Symfony\Component\HttpKernel\Exception\B..

Decoded Output download

<?php

namespace Drupal\Core\Form\Exception;

use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;

/**
 * Defines an exception used, when the POST HTTP body is broken.
 */
class BrokenPostRequestException extends BadRequestHttpException {

  /**
   * The maximum upload size.
   *
   * @var string
   */
  protected $size;

  /**
   * Constructs a new BrokenPostRequestException.
   *
   * @param string $max_upload_size
   *   The size of the maximum upload size.
   * @param string $message
   *   The internal exception message.
   * @param \Exception $previous
   *   The previous exception.
   * @param int $code
   *   The internal exception code.
   */
  public function __construct($max_upload_size, $message = NULL, \Exception $previous = NULL, $code = 0) {
    parent::__construct($message, $previous, $code);

    $this->size = $max_upload_size;
  }

  /**
   * Returns the maximum upload size.
   *
   * @return string
   *   A translated string representation of the size of the file size limit
   *   based on the PHP upload_max_filesize and post_max_size.
   */
  public function getSize() {
    return $this->size;
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace Drupal\Core\Form\Exception;

use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;

/**
 * Defines an exception used, when the POST HTTP body is broken.
 */
class BrokenPostRequestException extends BadRequestHttpException {

  /**
   * The maximum upload size.
   *
   * @var string
   */
  protected $size;

  /**
   * Constructs a new BrokenPostRequestException.
   *
   * @param string $max_upload_size
   *   The size of the maximum upload size.
   * @param string $message
   *   The internal exception message.
   * @param \Exception $previous
   *   The previous exception.
   * @param int $code
   *   The internal exception code.
   */
  public function __construct($max_upload_size, $message = NULL, \Exception $previous = NULL, $code = 0) {
    parent::__construct($message, $previous, $code);

    $this->size = $max_upload_size;
  }

  /**
   * Returns the maximum upload size.
   *
   * @return string
   *   A translated string representation of the size of the file size limit
   *   based on the PHP upload_max_filesize and post_max_size.
   */
  public function getSize() {
    return $this->size;
  }

}

Function Calls

None

Variables

None

Stats

MD5 70d6eaf4478d9f1643c9c05eb6a72ce7
Eval Count 0
Decode Time 88 ms