php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77755 Cannot preview or submit new note
Submitted: 2019-03-17 00:07 UTC Modified: -
From: mark at manngo dot net Assigned:
Status: Open Package: Website problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mark at manngo dot net
New email:
PHP Version: OS:

 

 [2019-03-17 00:07 UTC] mark at manngo dot net
Description:
------------
I have tried a few times to add a new user contributed note. If I select Preview or Add Note, I am returned to add-note page, without the form part.

The note itself doesn’t appear to be added.

Currently using Firefox on MacOS. I can’t see that that makes any difference.

Test script:
---------------
For PHP 7.1 on, the documentation states that integer and string keys can be mixed, but that elements with and without keys cannot. Here is an example, using data from getimagesize() with mixed keys:

<?php
	$data=[
		0=> 160,
		1 => 120,
		2 => 2,
		3 => 'width="160" height="120"',
		'mime' => 'image/jpeg'
	];
	list(0=>$width,1=>$height,2=>$type,3=>$dimensions,'mime'=>$mime)=$data;
?>

Here, the numeric keys also need to be specified, as if the whole array is treated as an associative array.

As noted elsewhere, the list() operator can be written in array format:

<?php
	[0=>$width,1=>$height,2=>$type,3=>$dimensions,'mime'=>$mime]=$data;
?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Oct 26 02:01:23 2020 UTC