Overview
Comment:Fix plugin config var access when the plugin does not have yet its configuration in the database (e.g., fresh install)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dev
Files: files | file ages | folders
SHA3-256: 36c88e39b173487e22cbf6e3b62eaaa8056ccfa1374704ae00a6fdecf8de6344
User & Date: alinaar on 2023-05-01 14:00:24
Other Links: branch diff | manifest | tags
Context
2023-05-05
18:08
Redirection to the login page fixed when coming from a plugin check-in: a47a21ee02 user: alinaar tags: dev
2023-05-01
14:00
Fix plugin config var access when the plugin does not have yet its configuration in the database (e.g., fresh install) check-in: 36c88e39b1 user: alinaar tags: dev
12:50
Fix "aa20690ed1e730b67505ba5a35fc876e7fd4ecf1" Plugin::$config initialization check-in: 76b816358f user: alinaar tags: dev
Changes

Modified src/include/lib/Garradin/Entities/Plugin.php from [ca15158449] to [11d6e4418f].

194
195
196
197
198
199
200
201
202
203
204
205
206
207
208

	public function getConfig(string $key = null)
	{
		if (is_null($key)) {
			return $this->config;
		}

		if (property_exists($this->config, $key)) {
			return $this->config->$key;
		}

		return null;
	}

	public function setConfigProperty(string $key, $value = null)







|







194
195
196
197
198
199
200
201
202
203
204
205
206
207
208

	public function getConfig(string $key = null)
	{
		if (is_null($key)) {
			return $this->config;
		}

		if ($this->config && property_exists($this->config, $key)) {
			return $this->config->$key;
		}

		return null;
	}

	public function setConfigProperty(string $key, $value = null)