# photonic/3.36/Components/Error.php

Photonic Gallery &amp; Lightbox for Flickr, SmugMug &amp; Others, version 3.36. 38 lines.

- Page: https://pluginprobe.com/plugins/photonic/3.36/code/Components/Error.php
- Raw: https://pluginprobe.com/plugins/photonic/3.36/raw/Components/Error.php
- Modified: 2026-07-23T21:21:48+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/photonic/3.36/code/Components/Error.php#L10-L20`.

```php
<?php

namespace Photonic_Plugin\Components;

use Photonic_Plugin\Layouts\Core_Layout;
use Photonic_Plugin\Platforms\Base;

class Error implements Printable {
	private string $message;

	/**
	 * Error constructor.
	 *
	 * @param String $message
	 */
	public function __construct(string $message) {
		$this->message = $message;
	}

	/**
	 * {@inheritDoc} - an Error
	 */
	public function html(Base $module, ?Core_Layout $layout, bool $print = false): string { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter
		$ret = "
<div class='photonic-error photonic-{$module->provider}-error' id='photonic-{$module->provider}-error-{$module->gallery_index}'>
	<span class='photonic-error-icon photonic-icon'>&nbsp;</span>
	<div class='photonic-message'>
		{$this->message}
	</div>
</div>\n";
		if ($print) {
			echo wp_kses_post($ret);
		}

		return wp_kses_post($ret);
	}
}

```
